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

pip --install-option leaks across lines #5089

Closed
philpennock opened this issue Mar 19, 2018 · 4 comments · Fixed by #5090
Closed

pip --install-option leaks across lines #5089

philpennock opened this issue Mar 19, 2018 · 4 comments · Fixed by #5090
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@philpennock
Copy link
Contributor

  • Pip version: 9.0.2
  • Python version: 3.6.4
  • Operating system: Ubuntu 16.04.4 LTS (Xenial)

Description:

Installing two packages using a requirements.txt file, where one package requires --install-option and the second doesn't, the --install-option leaks from the first package to the second, unless there's an intervening blank line.

What I've run:

% pyenv virtualenv 3.6.4 test-before-bugreport
% pyenv shell test-before-bugreport
% pip install -U pip setuptools
% pip list
Package    Version
---------- -------
pip        9.0.2
setuptools 39.0.1
% grep -E 'pygraphviz|M2Crypto' requirements.txt > new-req
% cat -nv new-req
     1	pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"
     2	M2Crypto
% pip install -r new-req
/home/dnsviz/.pyenv/versions/3.6.4/envs/test-before-bugreport/lib/python3.6/site-packages/pip/req/req_file.py:150: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options, opts)
Collecting pygraphviz (from -r new-req (line 1))
  Using cached pygraphviz-1.3.1.zip
Collecting M2Crypto (from -r new-req (line 2))
  Using cached M2Crypto-0.29.0.tar.gz
Installing collected packages: pygraphviz, M2Crypto
  Running setup.py install for pygraphviz ... done
  Running setup.py install for M2Crypto ... error
    Complete output from command /home/dnsviz/.pyenv/versions/3.6.4/envs/test-before-bugreport/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ikgbiv_3/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6fj6jp4d-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/dnsviz/.pyenv/versions/3.6.4/envs/test-before-bugreport/include/site/python3.6/M2Crypto --include-path=/usr/include/graphviz --library-path=/usr/lib/graphviz/:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --include-path not recognized

    ----------------------------------------
Command "/home/dnsviz/.pyenv/versions/3.6.4/envs/test-before-bugreport/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ikgbiv_3/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6fj6jp4d-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/dnsviz/.pyenv/versions/3.6.4/envs/test-before-bugreport/include/site/python3.6/M2Crypto --include-path=/usr/include/graphviz --library-path=/usr/lib/graphviz/" failed with error code 1 in /tmp/pip-build-ikgbiv_3/M2Crypto/

Repeating the invocation, pygraphviz is already installed, M2Crypto then installs fine.

Blank lines etc don't help. It looks as though the list of --install-option options is not being reset to empty at the start of the next entry.

@piotr-dobrogost
Copy link

piotr-dobrogost commented Mar 19, 2018

Duplicate of issue #4453 which already duplicates issue #3763

@philpennock
Copy link
Contributor Author

Sorry for the noise; I did search but I spotted nothing obviously came up in the first few results pages for my search text and I couldn't find search text which helped.

@piotr-dobrogost
Copy link

Sorry for the noise

No problem. Sometimes I can't find issues I know are there :)

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants