-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop generated source from source distribution #539
Comments
IMO it makes sense to have generated code in the source distribution. Other than removing Cython as a build dependency on the user's end, we can also be sure what code was compiled without worrying about bugs in different versions of Cython. |
We can pin the version of cython to generate source by pyproject.toml. https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-time-dependencies |
BTW, I recently restricted the cython version in borgbackup's pyproject.toml (and requirements.txt) and that just led to confusion / questions when some linux dist does not have that version. E.g. for the stable borgbackup, i thought Thus, in the end, I removed the version restriction again. So everybody can use any working cython version they want and we also offer the generated C code (in our case, generated with cython 0.29.x). So I also think bundling the generated C code in the sdist is a good idea. |
OK. I decided not to do it. |
As an after the fact counter argument, the most frequent changes to cython are to the output (not to the input) with old generated code not compiling with newer versions of CPython (leaving aside how much of the not-really-public API of CPython that cython uses). By including the generated c/c++ you are almost certainly giving up future compatibility of the sdist on newer versions of CPython (where the sdist is most valuable as there are not wheels for the future versions of CPython) that a user can not work around to avoid the chance of a bug in cython that users can easily work around (e.g. I have a project that tries to build the development branch of everything against the development branch of CPython (starting with the projects I am a maintainer on and gaining projects as needed). I have only seen a handful of actually regressions in Cython (and none in releases that I recall), but run into "sdist has pre-cythonized code that won't compile" frequently (it is probably the most common reason a project gets moved from I also would not try to pin the version of cython in the |
Thanks to cibuildwheel, we can provide wheels for most common platforms.
Dropping C++ source from source distribution will make build process simple.
The text was updated successfully, but these errors were encountered: