[Python-modules-team] Bug#823358: Unable to install in editable mode with setuptools extras
Brad Warren
bmw at eff.org
Tue May 3 21:45:25 UTC 2016
Package: python-pip
Version: 8.1.1-2
When trying to install a package in editable mode using setuptools
extras, pip crashes. Downgrading to pip 8.1.0 fixes the problem. I've
demonstrated the problem below using the Debian Sid docker image and the
pip GitHub repo as an example.
root at ea22ee879710:~# git clone https://github.com/pypa/pip.git
Cloning into 'pip'...
remote: Counting objects: 23076, done.
remote: Total 23076 (delta 0), reused 0 (delta 0), pack-reused 23075
Receiving objects: 100% (23076/23076), 42.92 MiB | 6.79 MiB/s, done.
Resolving deltas: 100% (15899/15899), done.
Checking connectivity... done.
root at ea22ee879710:~# cd pip/
root at ea22ee879710:~/pip# pip install -e .[testing]
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209,
in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line
305, in run
wheel_cache
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 280,
in populate_requirement_set
wheel_cache=wheel_cache
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line
136, in from_editable
editable_req, default_vcs)
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line
1146, in parse_editable
'__placeholder__' + extras
File
"/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py",
line 2806, in parse
req, = parse_requirements(s)
File
"/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py",
line 2754, in parse_requirements
yield Requirement(line)
File
"/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py",
line 2763, in __init__
raise RequirementParseError(str(e))
RequirementParseError: Invalid requirement, parse error at "'__placeh'"
root at ea22ee879710:~/pip# pip install pip==8.1.0
Collecting pip==8.1.0
Downloading pip-8.1.0-py2.py3-none-any.whl (1.2MB)
100% |################################| 1.2MB 1.1MB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside
environment /usr
Successfully installed pip-8.1.0
You are using pip version 8.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root at ea22ee879710:~/pip# pip --version
pip 8.1.0 from /usr/local/lib/python2.7/dist-packages (python 2.7)
root at ea22ee879710:~/pip# pip install -e .[testing]
Obtaining file:///root/pip
Collecting pytest (from pip==8.2.0.dev0)
Downloading pytest-2.9.1-py2.py3-none-any.whl (161kB)
100% |################################| 163kB 1.4MB/s
Collecting virtualenv>=1.10 (from pip==8.2.0.dev0)
Downloading virtualenv-15.0.1-py2.py3-none-any.whl (1.8MB)
100% |################################| 1.8MB 713kB/s
Collecting scripttest>=1.3 (from pip==8.2.0.dev0)
Downloading scripttest-1.3.tar.gz
Collecting mock (from pip==8.2.0.dev0)
Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)
100% |################################| 61kB 11.0MB/s
Collecting pretend (from pip==8.2.0.dev0)
Downloading pretend-1.0.8-py2.py3-none-any.whl
Collecting py>=1.4.29 (from pytest->pip==8.2.0.dev0)
Downloading py-1.4.31-py2.py3-none-any.whl (81kB)
100% |################################| 92kB 5.1MB/s
Collecting funcsigs>=1 (from mock->pip==8.2.0.dev0)
Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting six>=1.9 (from mock->pip==8.2.0.dev0)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock->pip==8.2.0.dev0)
Downloading pbr-1.9.1-py2.py3-none-any.whl (96kB)
100% |################################| 102kB 8.8MB/s
Building wheels for collected packages: scripttest
Running setup.py bdist_wheel for scripttest ... done
Stored in directory:
/root/.cache/pip/wheels/22/b5/64/ef06bb383edbf5a0dcfec1c3259cc58b3cbabceb2612f700fe
Successfully built scripttest
Installing collected packages: py, pytest, virtualenv, scripttest,
funcsigs, six, pbr, mock, pretend, pip
Running setup.py develop for pip
Successfully installed funcsigs-1.0.2 mock-2.0.0 pbr-1.9.1 pip-8.1.0
pretend-1.0.8 py-1.4.31 pytest-2.9.1 scripttest-1.3 six-1.10.0
virtualenv-15.0.1
You are using pip version 8.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root at ea22ee879710:~/pip#
More information about the Python-modules-team
mailing list