BLD: remove generated Cython files from sdist#14453
Merged
charris merged 1 commit intonumpy:masterfrom Sep 8, 2019
Merged
Conversation
Rationale: it has happened multiple times in the recent past that users needed to use a more recent Cython than was used to generate the sdist of the most recent release available on PyPI (e.g. for building with a not-yet-released version of Python for which a Cython fix just landed). The dependency specification and packaging tools have matured to the point where it should be fine to require Cython to be installed. Also, we have wheels (and conda-forge packages) for Windows, Linux and macOS, so this change won't be visible at all to the average user. Closes numpygh-13790 Also adds pyproject.toml to MANIFEST.in, it was missing.
9183322 to
d630d96
Compare
Member
|
LGTM. Note that SciPy parses the required version of cython out of the pyproject file, we could do the same, but let's add that later. Thanks Ralf. |
Member
Author
I figured that for a one-liner it's much more trouble than it's worth, easier to simply add a comment to keep two places in sync. SciPy actually needs |
5 tasks
4 tasks
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Dec 22, 2025
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Dec 22, 2025
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Dec 22, 2025
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Dec 22, 2025
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Dec 23, 2025
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Jan 6, 2026
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Jan 6, 2026
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
pyuxiang
added a commit
to s-fifteen-instruments/pyS15
that referenced
this pull request
Jan 6, 2026
Cythonizing pulls compatible CPython headers for compilation, and doing this prematurely is likely to cause issues when building wheels in environments without said headers, e.g. when building 'manylinux' wheels with 'cibuildwheel' across different Python versions. This is actually addressed in numpy [1] and pandas [2], with the same concerns of CPython version mismatch with the generated Cythonized files in sdist. This reintroduces Cython compilation to fix this issue, at the expense of increased compilation burden during manual installation (from source), but now allows for wheels to be built cleanly. [1]: numpy/numpy#14453 [2]: pandas-dev/pandas#28341
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.
Rationale: it has happened multiple times in the recent past that users
needed to use a more recent Cython than was used to generate the sdist
of the most recent release available on PyPI (e.g. for building with
a not-yet-released version of Python for which a Cython fix just
landed). The dependency specification and packaging tools have matured
to the point where it should be fine to require Cython to be installed.
Also, we have wheels (and conda-forge packages) for Windows, Linux and
macOS, so this change won't be visible at all to the average user.
Closes gh-13790, closes gh-14403
Also adds
pyproject.tomltoMANIFEST.in, it was missing.Another note: this is not in
setup_requireson purpose. For one becausegenerate_cythonruns beforesetup(**metadata)is invoked. For another, because if anyone runspython setup.py installthey can simply deal with any error if they get it. And usingsetup_requireswould invokeeasy_installin some cases, which isn't nice anyway.