Skip to content
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

Issue with packages with hyphen in the name #84

Open
benchstr opened this issue Nov 27, 2018 · 0 comments
Open

Issue with packages with hyphen in the name #84

benchstr opened this issue Nov 27, 2018 · 0 comments

Comments

@benchstr
Copy link

benchstr commented Nov 27, 2018

I believe there is an issue where if a file has a hyphen in the name pip expects it to be linked to a href with an underscore instead of a hyphen, at least this seems to be the case for python-dateutil

https://pypi.org/simple/python-dateutil/
<a href="https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl#sha256=063df5763652e21de43de7d9e00ccf239f953a832941e37be541614732cdfc93" data-requires-python="&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*">python_dateutil-2.7.5-py2.py3-none-any.whl</a>

dir2pi seems to want to preserve the hyphen which is causing packages to be missing

[root@centos ~]# pip install python-dateutil -v
Created temporary directory: /tmp/pip-ephem-wheel-cache-cE2aPS
Created temporary directory: /tmp/pip-req-tracker-poEmTp
Created requirements tracker '/tmp/pip-req-tracker-poEmTp'
Created temporary directory: /tmp/pip-install-NCWRIN
Looking in indexes: http://0.0.0.0/PyPI/simple
Collecting python-dateutil
  1 location(s) to search for versions of python-dateutil:
  * http://0.0.0.0/PyPI/simple/python-dateutil/
  Getting page http://0.0.0.0/PyPI/simple/python-dateutil/
  Starting new HTTP connection (1): 0.0.0.0:80
  http://0.0.0.0:80 "GET /PyPI/simple/python-dateutil/ HTTP/1.1" 200 106
  Analyzing links from page http://0.0.0.0/PyPI/simple/python-dateutil/
    Skipping link http://0.0.0.0/PyPI/simple/python-dateutil/python-dateutil-2.7.5-py2.py3-none-any.whl (from http://0.0.0.0/PyPI/simple/python-dateutil/); wrong project name (not python-dateutil)
  Could not find a version that satisfies the requirement python-dateutil (from versions: )
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-poEmTp'
No matching distribution found for python-dateutil
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 318, in run
    resolver.resolve(requirement_set)
  File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 218, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/usr/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 164, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python2.7/site-packages/pip/_internal/index.py", line 621, in find_requirement
    'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for python-dateutil

This is what my test repo looks like

view-source:http://0.0.0.0/PyPI/simple/python-dateutil/
<a href='python-dateutil-2.7.5-py2.py3-none-any.whl'>python-dateutil-2.7.5-py2.py3-none-any.whl</a><br />
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

No branches or pull requests

1 participant