ExtrasCandidate depends on exact base, before optional dependencies

This commit is contained in:
Pradyun Gedam 2020-05-21 21:08:01 +05:30
parent 95347df102
commit 9506a28114
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
1 changed files with 3 additions and 3 deletions

View File

@ -417,6 +417,9 @@ class ExtrasCandidate(Candidate):
extra
)
# Add a dependency on the exact base.
yield factory.make_requirement_from_candidate(self.base)
for r in self.base.dist.requires(valid_extras):
requirement = factory.make_requirement_from_spec_matching_extras(
str(r), self.base._ireq, valid_extras,
@ -424,9 +427,6 @@ class ExtrasCandidate(Candidate):
if requirement:
yield requirement
# Add a dependency on the exact base.
yield factory.make_requirement_from_candidate(self.base)
def get_install_requirement(self):
# type: () -> Optional[InstallRequirement]
# We don't return anything here, because we always