No way to specify build-time dependencies of setup.py
See original GitHub issuepip does not currently offer a way to specify build-time dependencies for setup.py. This makes all packages using numpy.distutils (used by nearly every Python package wrapping Fortran code since Python distutils does not support that) not reliably installable via pip.
Quick reading of the pip/setuptools docs gives the impression that setup_requires
is supposed to do this, and inform pip/setuptools about build-time dependencies required for running setup.py
.
However, this appears incorrect — in reality the dependencies are installed only when setup()
is called, which is usually too late. The value of setup_requires
appears not recorded in the *.egg-info files, and is ignored by pip (= special casing the call to egg_info will not help), also when it decides in which order to install packages.
Cf. https://github.com/scipy/scipy/issues/4474 the case for Scipy. Packages using Cython.distutils apparently have the same problem, cf. gh-1958. Solution to the installation problem would be appreciated.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:3
- Comments:19 (8 by maintainers)
Top GitHub Comments
As this pops up in google when searching for build time requirements in Python I thought I would leave relevant link with current information on the subject – https://packaging.python.org/specifications/#declaring-build-system-dependencies
In that case the project is not properly packaging their sources. pyproject.toml has to be included in the sdist.