Repository navigation
Install the build toolchain, so a direct setup.py invocation works - #769
Merged
Merged
Conversation
`USE_CYTHON=1 python setup.py build_ext --inplace` fails in CI with `ModuleNotFoundError: No module named 'setuptools'`. Nothing installed setuptools. `pip install .` looks like it would -- it does read `[build-system].requires` -- but PEP 517 build isolation provisions those packages into a throwaway environment that is discarded once the wheel is built, leaving nothing behind on the interpreter that ran pip. That was survivable while every build went through pip. It stops being survivable the moment something drives setup.py directly, which building the extensions *in place* requires: a build into site-packages is never imported by the test suite, since pytest runs from the repository root and `import faust` resolves to the source tree. Python 3.12 is where this turns into an error rather than a latent assumption. PEP 632 removed distutils, `ensurepip` stopped seeding setuptools along with it, and the interpreters `actions/setup-python` provides now ship with none. Add requirements/build.txt, mirroring `[build-system].requires`, and pull it into test.txt so a test environment can build the extensions rather than only consume them. Cython belongs in it for a second, quieter reason. Without Cython setup.py falls back to compiling pre-generated .c files, which this repository does not track; `ve_build_ext` then swallows the resulting error and re-runs setup with no `ext_modules` at all. `build_ext --inplace` exits 0 having built nothing, and the failure resurfaces much later as accelerated imports silently falling back to pure Python. Verified both halves against a bare interpreter: setuptools missing fails loudly, setuptools present but Cython missing exits 0 and writes no .so. Two more instances of the same assumption, fixed here rather than left to fail the same way: - dist.txt pinned `setuptools>=30.3.0,<69.0.0`, which contradicts the `setuptools>=69` pyproject.toml asks for -- an environment built from that file could not run the project's own build. It now includes build.txt, plus the `build` frontend scripts/build needs. - scripts/build ran `setup.py sdist bdist_wheel` directly, so it dies on the same missing import on any 3.12+ interpreter. It now uses `python -m build`, which provisions the backend itself and names the sdist per PEP 625 as PyPI requires -- the same reason the release workflow's sdist job already uses it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwJCsUD7opjiNRKdkQY87F
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #769 +/- ##
==========================================
+ Coverage 96.05% 96.07% +0.01%
==========================================
Files 103 103
Lines 11081 11081
Branches 1189 1189
==========================================
+ Hits 10644 10646 +2
+ Misses 345 343 -2
Partials 92 92 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Two leftovers from the same shrinking surface, both already visible as
warnings in every CI build:
_DeprecatedInstaller: setuptools.installer and fetch_build_eggs
are deprecated
dist.fetch_build_eggs(dist.setup_requires)
UserWarning: Unknown distribution option: 'tests_require'
`setup_requires=["setuptools_scm"]` is resolved by `fetch_build_eggs()`,
the easy_install-era installer setuptools is winding down, and it is
redundant twice over: setuptools_scm is in `[build-system].requires`, so
any PEP 517 build has it, and requirements/build.txt now provides it for
a direct setup.py call. Dropping it does not change the derived version
-- verified, still 0.13.2.dev7+ga87a5f16 from setuptools_scm, and the
wheel and sdist both still build.
`tests_require` only ever fed `setup.py test`. setuptools 72.0.0 deleted
that command, which is why setuptools now reports the option as unknown
and discards it; requirements/test.txt is what actually installs the test
dependencies.
The same setuptools release is behind issue #638. Not faust's code --
intervaltree's, whose setup.py imported `setuptools.command.test`, gone
as of 72.0.0 (confirmed against the wheels: present in 71.1.0, absent in
72.0.0, released 2024-07-29, the day the issue was filed). Every
intervaltree release from 3.0.1 to 3.1.0 shipped an sdist and no wheel,
so installing it had to run that setup.py, and pip and uv provision the
newest setuptools into the isolated build environment -- so faust
installs broke on a dependency the day it shipped.
intervaltree 3.2.0 (2025-12-19), its first release in five years, drops
setup.py for a hatchling backend and publishes wheels; neither half can
recur. It was already resolving to 3.2.1 in CI, but the requirement was
unpinned, so a lock or constraint file could still land on a broken one.
Floor it at 3.2.0. Its requires-python covers every interpreter faust
supports.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwJCsUD7opjiNRKdkQY87F
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.
USE_CYTHON=1 python setup.py build_ext --inplacefails in CI withModuleNotFoundError: No module named 'setuptools'.Nothing installed setuptools.
pip install .looks like it would --it does read
[build-system].requires-- but PEP 517 build isolationprovisions those packages into a throwaway environment that is
discarded once the wheel is built, leaving nothing behind on the
interpreter that ran pip. That was survivable while every build went
through pip. It stops being survivable the moment something drives
setup.py directly, which building the extensions in place requires:
a build into site-packages is never imported by the test suite, since
pytest runs from the repository root and
import faustresolves to thesource tree.
Python 3.12 is where this turns into an error rather than a latent
assumption. PEP 632 removed distutils,
ensurepipstopped seedingsetuptools along with it, and the interpreters
actions/setup-pythonprovides now ship with none.
Add requirements/build.txt, mirroring
[build-system].requires, andpull it into test.txt so a test environment can build the extensions
rather than only consume them.
Cython belongs in it for a second, quieter reason. Without Cython
setup.py falls back to compiling pre-generated .c files, which this
repository does not track;
ve_build_extthen swallows the resultingerror and re-runs setup with no
ext_modulesat all.build_ext --inplaceexits 0 having built nothing, and the failure resurfacesmuch later as accelerated imports silently falling back to pure Python.
Verified both halves against a bare interpreter: setuptools missing
fails loudly, setuptools present but Cython missing exits 0 and writes
no .so.
Two more instances of the same assumption, fixed here rather than left
to fail the same way:
dist.txt pinned
setuptools>=30.3.0,<69.0.0, which contradicts thesetuptools>=69pyproject.toml asks for -- an environment built fromthat file could not run the project's own build. It now includes
build.txt, plus the
buildfrontend scripts/build needs.scripts/build ran
setup.py sdist bdist_wheeldirectly, so it dieson the same missing import on any 3.12+ interpreter. It now uses
python -m build, which provisions the backend itself and names thesdist per PEP 625 as PyPI requires -- the same reason the release
workflow's sdist job already uses it.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01DwJCsUD7opjiNRKdkQY87F