Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Wheels with capitalized names can cause name comparison to fail #103

Open
ScottyMJacobson opened this issue Aug 30, 2015 · 0 comments
Open

Comments

@ScottyMJacobson
Copy link

Came across this when trying to install the "Markdown" package by putting "markdown" in requirements.txt

Traceback (most recent call last): File "/Users/scottyjacobson/Documents/Dev/accountable/env/bin/peep", line 11, in <module> sys.exit(main()) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 874, in main return commands[argv[1]](argv[2:]) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 846, in peep_install first_every_last(buckets[c], *printers) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 782, in first_every_last every(item) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 843, in <lambda> lambda r: out(r.error() + '\n'), File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 712, in error line = '%s==%s' % (self._name(), self._version()) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 417, in _version return get_version(self._downloaded_filename(), self._project_name()) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 405, in version_of_wheel give_up(filename, whl_package_name) File "/Users/scottyjacobson/Documents/Dev/accountable/env/lib/python2.7/site-packages/peep.py", line 412, in give_up (filename, package_name)) RuntimeError: The archive 'Markdown-2.6.2-py2.py3-none-any.whl' didn't start with the package name 'Markdown', so I couldn't figure out the version number. My bad; improve me.

Not sure if this is expected behavior (should peep be case-sensitive?), or it just needs an improved error message, but the easy fix would be check the .lower() of each before failing (suggested in #104)

ScottyMJacobson added a commit to ScottyMJacobson/peep that referenced this issue Aug 30, 2015
Compare .lower()s of whl_package_name and our_name when getting version in case capitalization is inconsistent across the two
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant