Skip to content

install-options argument pollutes the environment #3845

@umairwaheed

Description

@umairwaheed
  • Pip version:
    8.1.2
  • Python version:
    3.5.1
  • Operating System:
    Mac OSX (10.9.5) and Linux (Ubuntu 14.04)

Description:

If you try to install two resources via a requirements file and the first resource has a --install-options argument then this argument is also passed to the second resource. The contents of my resource file are:

git+https://github.com/umairwaheed/talon.git@strip-talon --install-option="--no-ml"
git+https://github.com/sharmaeklavya2/mypy.git@4d2db8601def7813142e3bdd91b14f331ea0427c

The second resource fails to get installed because its setup.py was also passed --no-ml argument.

The only workaround is to install the second resource as an egg:

git+https://github.com/sharmaeklavya2/mypy.git@4d2db8601def7813142e3bdd91b14f331ea0427c#egg=mypy-lang-0.4.3.dev0

What I've run:

(test3) Umairs-MacBook-Pro:zulip umairkhan$ pip install --no-deps -r requirements.txt 
/Users/umairkhan/.virtualenvs/test3/lib/python3.5/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 git+https://github.com/umairwaheed/talon.git@strip-talon (from -r requirements.txt (line 1))
  Cloning https://github.com/umairwaheed/talon.git (to strip-talon) to /var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-zuzxohhg-build
Collecting git+https://github.com/sharmaeklavya2/mypy.git@4d2db8601def7813142e3bdd91b14f331ea0427c (from -r requirements.txt (line 2))
  Cloning https://github.com/sharmaeklavya2/mypy.git (to 4d2db8601def7813142e3bdd91b14f331ea0427c) to /var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-u8l23vqb-build
  Could not find a tag or branch '4d2db8601def7813142e3bdd91b14f331ea0427c', assuming commit.
Installing collected packages: talon, mypy-lang
  Running setup.py install for talon ... done
  Running setup.py install for mypy-lang ... error
    Complete output from command /Users/umairkhan/.virtualenvs/test3/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-u8l23vqb-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-4o2tblul-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/umairkhan/.virtualenvs/test3/bin/../include/site/python3.5/mypy-lang --no-ml:
    /Users/umairkhan/.virtualenvs/test3/lib/python3.5/site-packages/setuptools/dist.py:295: UserWarning: Normalizing '0.4.3-dev' to '0.4.3.dev0'
      normalized_version,
    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 --no-ml not recognized

    ----------------------------------------
Command "/Users/umairkhan/.virtualenvs/test3/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-u8l23vqb-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-4o2tblul-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/umairkhan/.virtualenvs/test3/bin/../include/site/python3.5/mypy-lang --no-ml" failed with error code 1 in /var/folders/f_/3wm9fdqs1yzcrppf2496d5fr0000gn/T/pip-u8l23vqb-build/

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions