pipdeptree
pipdeptree copied to clipboard
Suggest change `project_name` to lower case
Suggest change project_name
to lower case, since pip package name is case insensitive.
Packages like Pillow, Pygments and PyYAML often has different spellings in other package's dependency list. This will reduce isolated packages / dependencies produced by pipdeptree.
This change only need to add four lines in build_dist_index
:
for p in pkgs:
p.project_name = p.project_name.lower()
for r in p.requires():
r.project_name = r.project_name.lower()
return dict((p.key, DistPackage(p)) for p in pkgs)
Can you please open a PR with both this one and #100? Will be easier to test and merge that way.
It's PR #102, but 092503b1abfbcf9a58c5238864708b2ef800ec91 test failed.
This sound like a duplicate of issue https://github.com/naiquevin/pipdeptree/issues/77.
@sschuberth It's a duplicate, do you have any idea to fix these failed tests in PR #102?
Tests could have failed for completely different reason. The tests have become complicated and messy and I am trying to sort it out. Will test this PR and merge it. Thanks.
I think we should leave the package name normalization up to pip.