@@ -347,8 +347,8 @@ class ExtrasCandidate(Candidate):
347
347
to treat it as a separate node in the dependency graph.
348
348
2. When we're getting the candidate's dependencies,
349
349
a) We specify that we want the extra dependencies as well.
350
- b) We add a dependency on the base candidate (matching the name and
351
- version). See below for why this is needed.
350
+ b) We add a dependency on the base candidate.
351
+ See below for why this is needed.
352
352
3. We return None for the underlying InstallRequirement, as the base
353
353
candidate will provide it, and we don't want to end up with duplicates.
354
354
@@ -417,20 +417,17 @@ def iter_dependencies(self):
417
417
extra
418
418
)
419
419
420
+ # Add a dependency on the exact base
421
+ # (See note 2b in the class docstring)
422
+ yield factory .make_requirement_from_candidate (self .base )
423
+
420
424
for r in self .base .dist .requires (valid_extras ):
421
425
requirement = factory .make_requirement_from_spec_matching_extras (
422
426
str (r ), self .base ._ireq , valid_extras ,
423
427
)
424
428
if requirement :
425
429
yield requirement
426
430
427
- # Add a dependency on the exact base.
428
- # (See note 2b in the class docstring)
429
- # FIXME: This does not work if the base candidate is specified by
430
- # link, e.g. "pip install .[dev]" will fail.
431
- spec = "{}=={}" .format (self .base .name , self .base .version )
432
- yield factory .make_requirement_from_spec (spec , self .base ._ireq )
433
-
434
431
def get_install_requirement (self ):
435
432
# type: () -> Optional[InstallRequirement]
436
433
# We don't return anything here, because we always
0 commit comments