Implement minimal build system
See original GitHub issueCurrently, most Cython users have to implement code in their setup.py
files to decide whether to recompile the .pyx
sources with Cython or not, and what to do if Cython is not installed. Essentially this dance:
http://docs.cython.org/en/latest/src/reference/compilation.html#distributing-cython-modules
PEP 517 and PEP 518 provide ways to configure certain build system tools for a given project. This can be used to provide a simple Cython build package that does this once and for all, is distributed separately via PyPI, and internally calls Cython when necessary and requested, but otherwise just replaces the .pyx
files by pre-generated .c
files that come with the source distribution.
It would become a dependency of Cython itself and some parts of the cythonize()
implementation would be moved into the new build package. Meaning, most of the code is already there in one way or another, just needs to be extracted and cleanly put into an external package.
Also see #1981, which could be solved at the same time (in a single package).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:30 (28 by maintainers)
Top GitHub Comments
I still don’t understand why everybody wants to NOT depend on Cython at build-time. First of all, what’s wrong with Cython as dependency? Second, if you’re going to add a minimal build system as new package, then you’ll need a dependency anyway.
I would like to see this logic pushed up to setuptools (by default at least). We had some discussions about this at the workshop in Cernay, but I can’t seem to find a pointer to the notes. @embray did you have those handy?