question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to specify build-time dependencies of setup.py

See original GitHub issue

pip 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:closed
  • Created 9 years ago
  • Reactions:3
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
piotr-dobrogostcommented, Aug 3, 2017

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

1reaction
pradyunsgcommented, Sep 7, 2018

it is stripped from the tarball that python setup.py sdist creates.

In that case the project is not properly packaging their sources. pyproject.toml has to be included in the sdist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependencies Management in Setuptools
When your project is installed (e.g., using pip), all of the dependencies not already installed will be located (via PyPI), downloaded, built (if...
Read more >
How to declare build-time dependencies without breaking ...
1 Answer 1 · no temporarily/alternative solution to install python-daemon? · @Ali As of python-daemon version 2.0. · @bignose I assume you're the...
Read more >
Support for build-and-run-time dependencies - Packaging
I think setup requires is there more as a backup for old backends. In practice you would specify the exact build dependency in...
Read more >
Why you shouldn't invoke setup.py directly - Paul Ganssle
The problem gets even worse when you consider that your package may have a dependency on a specific version of setuptools.
Read more >
Project:Python/Dependencies - Gentoo Wiki
A script or a Python module from this package is used (run, loaded) at build time. The setup script aborts if the package...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found