Skip to content

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
falken10vdl:fix/ifctester-setuptools-py312-v2
Open

fix(ifctester): add setuptools to venv pip install for Python 3.12+ compatibility#7920
falken10vdl wants to merge 1 commit intoIfcOpenShell:v0.8.0from
falken10vdl:fix/ifctester-setuptools-py312-v2

Conversation

@falken10vdl
Copy link
Copy Markdown
Contributor

@falken10vdl falken10vdl commented Apr 8, 2026

The webapp-stage-ifctester-wheel target in src/ifctester/Makefile fails when building with Python 3.12 or 3.13:

ERROR Backend 'setuptools.build_meta' is not available.
make[1]: *** [Makefile:98: webapp-stage-ifctester-wheel] Error 1
make: *** [Makefile:138: dist] Error 2

Python 3.12 changed the behaviour of python -m venv: new virtual environments no longer include setuptools by default (PEP 668, CPython issue #95299).

The target uses --no-isolation, meaning python -m build expects the setuptools.build_meta backend to already be present in the venv. On Python 3.11 this works because --system-site-packages inherits setuptools from the system interpreter. On Python 3.12+ the system interpreter no longer ships setuptools by default in venvs either, so the backend is simply absent.

Fix

Explicitly install setuptools alongside build in the venv setup step.

-python -m pip install build && python -m build --wheel --no-isolation
+python -m pip install build setuptools && python -m build --wheel --no-isolation

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant