Skip to content

fix possible issue with transitive build dependencies #1922

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

Conversation

benoit-pierre
Copy link
Member

@benoit-pierre 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 fix_possible_issue_with_transitive_build_dependencies_from_extras branch 2 times, most recently from 4c9bea1 to 8b20dfd Compare November 26, 2019 20:41
@frivoire
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 :)

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 fix_possible_issue_with_transitive_build_dependencies_from_extras branch from 8b20dfd to 7502dc9 Compare November 27, 2019 18:15
@jaraco jaraco merged commit 812b83c into pypa:master Dec 1, 2019
@benoit-pierre benoit-pierre deleted the fix_possible_issue_with_transitive_build_dependencies_from_extras branch December 1, 2019 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants