This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hoodchatham
Recipients christian.heimes, hoodchatham
Date 2022-04-05.19:27:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1649186834.9.0.275232571142.issue47232@roundup.psfhosted.org>
In-reply-to
Content
I am trying to build tot Python for Emscripten to test recent changes and having trouble. The problem is caused by recent changes since 3.11.0a6 to `sre`. I build a build Python 3.11 from tot, and provided it to `./configure --with-build-python=$(HOSTBUILDDIR)/python`. However, I still see invocations to the system Python 3.11 at `/usr/local/bin/python3.11`.

The problem seems to be that the generated `Makefile` has a bunch of stuff collapsed into one line:
```
PYTHON_FOR_BUILD=_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) /src/cpython/build/Python-3.11.0dev0/builddir/build-host/python
```
manually fixing this to:
```
PYTHON_FOR_BUILD=/src/cpython/build/Python-3.11.0dev0/builddir/build-host/python
_PYTHON_PROJECT_BASE=$(abs_builddir) 
_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) 
PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH)
```
fixes the problem.

My configure invocation is as follows:
```
	( \
		cd $(BUILDDIR); \
		CONFIG_SITE=./config.site-wasm32-emscripten emconfigure \
		  ../../configure \
		  	  --cache-file=$(ROOT)/python.config.cache \
			  CFLAGS="${PYTHON_CFLAGS}" \
			  CPPFLAGS="-I$(SQLITEBUILD) -I$(BZIP2BUILD) -I$(ZLIBBUILD)" \
			  PLATFORM_TRIPLET="$(PLATFORM_TRIPLET)" \
			  --with-build-python=$(HOSTBUILDDIR)/python \
			  --without-pymalloc \
			  --disable-shared \
			  --disable-ipv6 \
			  --enable-big-digits=30 \
			  --enable-optimizations \
			  --host=wasm32-unknown-emscripten\
			  --build=$(shell $(EXTRACTDIR)/config.guess) \
			  --prefix=$(INSTALL)  \
	)
```
History
Date User Action Args
2022-04-05 19:27:15hoodchathamsetrecipients: + hoodchatham, christian.heimes
2022-04-05 19:27:14hoodchathamsetmessageid: <1649186834.9.0.275232571142.issue47232@roundup.psfhosted.org>
2022-04-05 19:27:14hoodchathamlinkissue47232 messages
2022-04-05 19:27:14hoodchathamcreate