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

fix possible issue with transitive build dependencies #1922

Conversation

@benoit-pierre
Copy link
Member

benoit-pierre commented Nov 26, 2019

Handle the case where a missing transitive build dependency is required by an extra for an already installed build dependency.

Example:

  • a test package with a setup.py containing: setup_requires=['dep[extra]']
  • dep is already installed, and the dependencies for extra are: ['extra_dep']
  • extra_dep is not already installed, and fetch_build_egg('extra_dep; extra =="extra"') is called

If the marker is not stripped, pip wheel [...] 'extra_dep; extra =="extra"' ignores the requirement, and does not build a wheel, but still returns with no error.

Summary of changes

Closes the second issue found in #1920.

Pull Request Checklist

  • Changes have tests
  • News fragment added in changelog.d. See documentation for details
@benoit-pierre benoit-pierre force-pushed the benoit-pierre:fix_possible_issue_with_transitive_build_dependencies_from_extras branch 2 times, most recently from 4c9bea1 to 8b20dfd Nov 26, 2019
@frivoire

This comment has been minimized.

Copy link

frivoire commented Nov 27, 2019

It seems I'm impacted by this bug too, with one difference : my use case is dependencies in tests_require and not in setup_requires.

So, the proposed fix should be ok (it's in a generic code path that is used for both tests_require and setup_requires as far as I understand) :)

EDIT: I tested the patch of this PR in my context, and it does indeed fix the IndexError :)

setuptools/installer.py Outdated Show resolved Hide resolved
Handle the case where a missing transitive build dependency is
required by an extra for an already installed build dependency.
@benoit-pierre benoit-pierre force-pushed the benoit-pierre:fix_possible_issue_with_transitive_build_dependencies_from_extras branch from 8b20dfd to 7502dc9 Nov 27, 2019
jaraco added 2 commits Dec 1, 2019
@jaraco jaraco merged commit 812b83c into pypa:master Dec 1, 2019
2 of 4 checks passed
2 of 4 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Summary 1 potential rule
Details
deploy/netlify Deploy preview ready!
Details
@benoit-pierre benoit-pierre deleted the benoit-pierre:fix_possible_issue_with_transitive_build_dependencies_from_extras branch Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.