Skip to content

Build dependencies with no binary wheels don't work #5229

Closed
@pv

Description

@pv
  • Pip version: 10.0.0
  • Python version: 3.6.5
  • Operating system: Linux/Fedora

Description:

When installing dependencies given in pyproject.toml, pip does not seem to consider sdists on Pypi, only binary wheels.

That it only looks for binary wheels is not immediately expected, and does not seem to be mentioned in PEP 518. I think the correct behavior is that sdists are considered (although perhaps only if there are no binary wheels available).

What I've run:

The following is a reproducing shell script

# test.sh
set -e -x

rm -rf mytest
mkdir mytest
cd mytest

python3 -mvenv env
./env/bin/pip install --upgrade 'pip>=10'

echo "assert False" > setup.py
cat <<EOF > pyproject.toml
[build-system]
requires = [
    "wheel",
    "setuptools",
    "numpy==1.8.2",
]
EOF

./env/bin/pip wheel .

When I run this, I get

+ rm -rf mytest
+ mkdir mytest
+ cd mytest
+ python3 -mvenv env
+ ./env/bin/pip install --upgrade 'pip>=10'
Collecting pip>=10
  Using cached pip-10.0.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-10.0.0
+ echo 'assert False'
+ cat
+ ./env/bin/pip wheel .
Processing /home/pauli/tmp/foo/mytest
  Could not find a version that satisfies the requirement numpy==1.8.2 (from versions: 1.11.3, 1.12.0rc2, 1.12.0, 1.12.1rc1, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2)
No matching distribution found for numpy==1.8.2

I would have expected this would succeed in installing the build dependencies. (And fail when it tries to run the setup.py --- in my real use I of course have a working setup.py but the behavior is the same).

If the version number is changed to e.g. numpy==1.11.3 for which Numpy has binary wheels on PyPi, it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationtype: supportUser Support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions