-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automation
Description
Installing a package with version and extra features specified fails. This applies equally on the command line and in a requirements file. The documentation explicitly states that this will work http://www.pip-installer.org/en/latest/requirements.html#the-requirements-file-format
$ pip install "MyPackage==3.0 [PDF]"
Exception:
Traceback (most recent call last):
File "/home/XXX/myenv/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
status = self.run(options, args)
File "/home/XXX/myenv/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 225, in run
InstallRequirement.from_line(name, None))
File "/home/XXX/myenv/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 118, in from_line
return cls(req, comes_from, url=url)
File "/home/XXX/myenv/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 43, in __init__
req = pkg_resources.Requirement.parse(req)
File "/home/XXX/myenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2510, in parse
reqs = list(parse_requirements(s))
File "/home/XXX/myenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2436, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/home/XXX/myenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2414, in scan_list
"Expected ',' or end-of-list in",line,"at",line[p:]
ValueError: ("Expected ',' or end-of-list in", 'MyPackage==3.0 [PDF]', 'at', ' [PDF]')
Storing complete log in /home/XXX/.pip/pip.log
It appears that this is inherited from pgk_resources
:
>>> import pkg_resources
>>> for req in pkg_resources.parse_requirements('MyPackage==3.0 [PDF]'):
... print str(req)
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2535, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2513, in scan_list
"Expected ',' or end-of-list in",line,"at",line[p:]
ValueError: ("Expected ',' or end-of-list in", 'MyPackage==3.0 [PDF]', 'at', ' [PDF]')
I also tried the following work-around in my requirements file, but this was deemed a "double requirement"
MyPackage == 3.0
MyPackage [PDF]
Metadata
Metadata
Assignees
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automation