Skip to content
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

Error building a wheel for a dependency using setuptools and without a PEP517 build-backend specified #213

Closed
1 task done
orions-stardom opened this issue Dec 30, 2020 · 0 comments · Fixed by #214
Closed
1 task done
Labels
🐛 bug Something isn't working

Comments

@orions-stardom
Copy link
Contributor

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

pdm use python3.9
pdm add "multidict==4.7.6"

This will reproduce for any dependency meeting the following criteria:

  • Has no prebuilt wheels for the in-use python
  • Has a pyproject.toml with a build-system table and a suitable build-requires per PEP518
  • Does NOT have a build-backend specified per PEP517

Actual behavior

pip will fail when setting up the isolated build environment.

Build log:

ERROR: Double requirement given: setuptools>=40.8.0 (from -r /tmp/pdm-build-reqs-9v3tpxwp.txt (line 4)) (already in setuptools>=40 (from -r /tmp/pdm-build-reqs-9v3tpxwp.txt (line 2)), name='setuptools')
Preparing isolated env for PEP 517 build...
ERROR: Double requirement given: setuptools>=40.8.0 (from -r /tmp/pdm-build-reqs-t530gg95.txt (line 4)) (already in setuptools>=40 (from -r /tmp/pdm-build-reqs-t530gg95.txt (line 2)), name='setuptools')

contents of the errant build-reqs.txt:

pip>=18
setuptools>=40
wheel
setuptools >= 40.8.0
wheel

This is the build system requirements of multidict prepended to the requirements of pdm's DEFAULT_BACKEND.

Expected behavior

The wheel should build succesfully, as it does with both poetry and pip.

According to PEP518:

If the file exists but is lacking the [build-system] table then the default values as specified above should be used. If the table is specified but is missing required fields then the tool should consider it an error.

So, when build-system.requires is present, pdm should just accept it verbatim. Appending the default backend requirements to the specified backend requirements is not supported by either PEP517 or PEP518.

Environment Information

Reproduces on both dev (1.0.0b0) stable (0.12.13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant