fix(ifctester): add setuptools to venv pip install for Python 3.12+ compatibility#7920
Open
falken10vdl wants to merge 1 commit intoIfcOpenShell:v0.8.0from
Open
fix(ifctester): add setuptools to venv pip install for Python 3.12+ compatibility#7920falken10vdl wants to merge 1 commit intoIfcOpenShell:v0.8.0from
falken10vdl wants to merge 1 commit intoIfcOpenShell:v0.8.0from
Conversation
…ompatibility Python 3.12+ no longer includes setuptools in newly created virtual environments. The webapp-stage-ifctester-wheel target builds a wheel using 'python -m build --wheel --no-isolation', which requires the setuptools.build_meta backend to be available in the venv. On Python 3.11 this works because --system-site-packages pulls in setuptools from the system installation. On Python 3.12 and 3.13 setup tools is not present, causing: ERROR Backend 'setuptools.build_meta' is not available. make[1]: *** [Makefile:98: webapp-stage-ifctester-wheel] Error 1 Fix by explicitly installing setuptools alongside build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
webapp-stage-ifctester-wheeltarget insrc/ifctester/Makefilefails when building with Python 3.12 or 3.13:Python 3.12 changed the behaviour of
python -m venv: new virtual environments no longer includesetuptoolsby default (PEP 668, CPython issue #95299).The target uses
--no-isolation, meaningpython -m buildexpects thesetuptools.build_metabackend to already be present in the venv. On Python 3.11 this works because--system-site-packagesinheritssetuptoolsfrom the system interpreter. On Python 3.12+ the system interpreter no longer shipssetuptoolsby default in venvs either, so the backend is simply absent.Fix
Explicitly install
setuptoolsalongsidebuildin the venv setup step.