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

Regression: pip 8.1.2 does not handle "-e .[EXTRA]" correctly. #3810

Closed
jansenm opened this issue Jun 23, 2016 · 1 comment
Closed

Regression: pip 8.1.2 does not handle "-e .[EXTRA]" correctly. #3810

jansenm opened this issue Jun 23, 2016 · 1 comment
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on
Milestone

Comments

@jansenm
Copy link

jansenm commented Jun 23, 2016

  • Pip version: 8.1.2
  • Python version: 3.4.1
  • Operating System: linux

Description:

I have a requirements_devel.txt with one line in my project

-e .[DOC,TST]

The idea is to install the doc and tst dependencies only when needed. But it does not work with pip 8.1.2. It works with pip 7.1.2.

What I've run:

venv/bin/pip install -e '.[DOC,TST]'
Obtaining file:///home/mjansen/projects/python3_setup
Requirement already satisfied (use --upgrade to upgrade): sphinx in ./venv/lib/python3.4/site-packages (from mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): pytest in ./venv/lib/python3.4/site-packages (from mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): pytest-cov in ./venv/lib/python3.4/site-packages (from mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): Pygments>=2.0 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.3 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): alabaster<0.8,>=0.7 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): babel!=2.0,>=1.3 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.11 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): snowballstemmer>=1.1 in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): imagesize in ./venv/lib/python3.4/site-packages (from sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in ./venv/lib/python3.4/site-packages (from pytest->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): coverage>=3.7.1 in ./venv/lib/python3.4/site-packages (from pytest-cov->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in ./venv/lib/python3.4/site-packages (from Jinja2>=2.3->sphinx->mjlib==0.0.1)
Requirement already satisfied (use --upgrade to upgrade): pytz>=0a in ./venv/lib/python3.4/site-packages (from babel!=2.0,>=1.3->sphinx->mjlib==0.0.1)
Installing collected packages: mjlib
  Running setup.py develop for mjlib
Successfully installed mjlib-0.0.1
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

A new version. thats nice. lets update and try again

venv/bin/pip install pip --upgrad
Collecting pip
  Using cached pip-8.1.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
Successfully installed pip-8.1.2
mjansen@linux-8523:~/projects/python3_setup> venv/bin/pip install -e '.[DOC,TST]'
Obtaining file:///home/mjansen/projects/python3_setup
  mjlib 0.0.1 does not provide the extra 'DOC'
  mjlib 0.0.1 does not provide the extra 'TST'
Installing collected packages: mjlib
  Running setup.py develop for mjlib
Successfully installed mjlib-0.0.1

As you can see 8.1.2 can't handle extras_require.

muelli added a commit to muelli/geysigning that referenced this issue Sep 6, 2016
This shold make it possible to install those dependencies when
installing with "extras", e.g. keysign[test] or ".[test]" as in
pip install ".[test]".

However, current pip seems to have a bug which makes it not work:
pypa/pip#3810
@xavfernandez xavfernandez added this to the 8.2 milestone Oct 15, 2016
@xavfernandez
Copy link
Member

It seems to be a case-sensitive issue.
A simple setup.py makes it easy to reproduce:

(tmp-1ef25c2a0596072) $ cat setup.py
from setuptools import setup

setup(name='toto', extras_require={'DOC': ['pep8']})
(tmp-1ef25c2a0596072) $ pip install -e .[DOC]
Obtaining file:///home/xfernandez/tmp/hop
  toto 0.0.0 does not provide the extra 'DOC'
Installing collected packages: toto
  Running setup.py develop for toto
Successfully installed toto-0.0.0
(tmp-1ef25c2a0596072) $ pip install -e .[doc]
Obtaining file:///home/xfernandez/tmp/hop
Collecting pep8 (from toto==0.0.0)
  Using cached https://private_pypi/root/pypi/+f/6cf/e097210e2efb1/pep8-1.7.0-py2.py3-none-any.whl
Installing collected packages: pep8, toto
  Running setup.py develop for toto
Successfully installed pep8-1.7.0 toto-0.0.0

@xavfernandez xavfernandez added the good first issue A good item for first time contributors to work on label Oct 26, 2016
xavfernandez added a commit to xavfernandez/pip that referenced this issue Oct 28, 2016
It's not only the case but special characters also
xavfernandez added a commit to xavfernandez/pip that referenced this issue Oct 29, 2016
since dist.extras are already canonicalized, pip needs to canonicalize
extras before matching them with dist.extras

Fixes pypa#3810
snarfed added a commit to snarfed/oauth-dropins that referenced this issue Dec 1, 2016
…ypa/pip#3810

...since readthedocs is still on pip 8.1.2. :/ may file an issue for that later.
snarfed added a commit to snarfed/oauth-dropins that referenced this issue Dec 1, 2016
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on
Projects
None yet
Development

No branches or pull requests

2 participants