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

--global-option in requirements.txt doesn't take an effect with pip wheel #6047

Open
sakurai-youhei opened this issue Nov 29, 2018 · 0 comments
Labels
C: requirement file Using `requirements.txt` state: needs eyes Needs a maintainer/triager to take a closer look

Comments

@sakurai-youhei
Copy link

sakurai-youhei commented Nov 29, 2018

Environment

  • pip version: 18.1
  • Python version: 3.7.0, 3.4.3
  • OS: Windows 10, Linux

Description

If --global-option is written in requirements.txt (like somepackage --global-option=clean), then pip wheel won't pick up the option.

Case no. 1: --global-option=clean via command line

The clean is inserted before bdist_wheel successfully.

python -m pip -v wheel pip --global-option=clean

  Running command C:\Users\sakurai\Desktop\ENV\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sakurai\\AppData\\Local\\Temp\\pip-wheel-k8cmdetq\\pip\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean bdist_wheel -d C:\Users\sakurai\AppData\Local\Temp\pip-wheel-t40qzaes

Case no. 2: --global-option=clean via requirements.txt

The clean doesn't appear and this is the issue I'd like to report.

echo pip --global-option=clean > requirements.txt
python -m pip -v wheel -r requirements.txt

  Running command C:\Users\sakurai\Desktop\ENV\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sakurai\\AppData\\Local\\Temp\\pip-wheel-s4jol4ag\\pip\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\sakurai\AppData\Local\Temp\pip-wheel-yq4a_n_u

Expected behavior

Case no. 2 results the same with case no. 1.

Notes

  1. I see that --global-option for a specific requirement in requirements file disables use of wheels globally #4118 is apparent in 18.1 but I'm not sure how much they are connected.
  2. pip install doesn't seem to have the same issue.
  3. 19.0.dev0 would be worse because --global-option=clean does no longer take an effect even if the option is given via command line.
@sakurai-youhei sakurai-youhei changed the title --global-option in requirements.txt loses an effect for pip wheel --global-option in requirements.txt doesn't take an effect with pip wheel Nov 29, 2018
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label Dec 14, 2018
@pradyunsg pradyunsg added C: requirement file Using `requirements.txt` state: needs eyes Needs a maintainer/triager to take a closer look labels Jun 30, 2020
@triage-new-issues triage-new-issues bot removed S: needs triage Issues/PRs that need to be triaged labels Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: requirement file Using `requirements.txt` state: needs eyes Needs a maintainer/triager to take a closer look
Projects
None yet
Development

No branches or pull requests

2 participants