Skip to content

--no-clean and --build are broken #2060

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

Closed
gwideman opened this issue Sep 23, 2014 · 7 comments
Closed

--no-clean and --build are broken #2060

gwideman opened this issue Sep 23, 2014 · 7 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@gwideman
Copy link

Pip version 1.5.6
Python 3.4
Windows 7-64

pip install help advertises options:

--no-clean to prevent pip from deleting the build directory and contents, and
-b (--build) to specify build directory

and the help for -b says "The default in a virtualenv is "[venv path]/build". The default for global installs is "[OS temp dir]/pip_build_[username]".

On Windows, and from a virtual env, when I run:

pip install -b [some existing path] --no-clean [somepackage].whl

... pip actually uses C:/Users/[me]/AppData/Local/Temp/pip-[random]-build/[packagename] as the build directory, and deletes it when done.

So:

--no-clean is broken
-b (--build) is broken
--build's help text about default build path seems to be incorrect.

From my not-too-thorough inspection, the problem appears to be that the code that deterimines build path and clean behavior is in req.py, and ignores the no_clean and build_dir settings. Code in install.py that does pay attention to no_clean and build_dir is pre-empted.

I'm assuming that some refactoring of the code broke these features.

I realize that build_dir and no_clean are deprecated (and pip shows a message to that effect), but if they are broken then they should not be reported as deprecated.

Further, issue #906 discusses this deprecation, in which a number of users request that no_clean NOT be removed. I add my vote to that, as it's useful for troubleshooting build steps that went wrong. The current issue that I'm raising is a case in point!

@qwcode
Copy link
Contributor

qwcode commented Sep 24, 2014

it's not broke in linux (using v1.5.6):

can you provide full console output to a gist or a pastebin somewhere that confirms what you're saying.

@qwcode
Copy link
Contributor

qwcode commented Sep 24, 2014

[somepackage].whl

oh, ok, if you're installing directly from a local archive, then you're problem may be #804

@qwcode
Copy link
Contributor

qwcode commented Sep 24, 2014

btw, it looks like #804 may be fixed for local wheel archives in the develop branch (i.e. it's not released yet) as a by-product of #1831. I'll re-confirm tomorrow and update the issues and changelog if true.

@gwideman
Copy link
Author

@qwcode Looks like you figured out what I was reporting, and perhaps it's fixed.
I guess the issue is that for local archives, pip expects to get the project name from inside the archive once it's unpacked into the build directory, hence does not have the project name in time to name the build directory. Hence reverts to temp build directory.
However, with wheel archive, the project name is in the archive name, so pip could get the project name from there.
Also, even if it uses the temp build directory, there's no rationale for --no-clean to be ignored.
Anyhow, sounds like some or all of this is resolved in the develop branch.
Thanks for commenting.

@qwcode
Copy link
Contributor

qwcode commented Sep 25, 2014

with wheel archive, the project name is in the archive name, so pip could get the project name

right, and it does now in develop branch (PR #1831)

even if it uses the temp build directory, there's no rationale for --no-clean to be ignored

agreed, will add a comment about that to #804

@qwcode
Copy link
Contributor

qwcode commented Sep 25, 2014

updated the changelog about #1831 fixing this problem for wheel archives
3bb4cbd

@gwideman
Copy link
Author

@qwcode Thanks Marcus!

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

No branches or pull requests

2 participants