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 wheel --no-clean does not prevent clean #5661

Open
mhsmith opened this issue Jul 27, 2018 · 4 comments
Open

pip wheel --no-clean does not prevent clean #5661

mhsmith opened this issue Jul 27, 2018 · 4 comments
Labels
C: wheel The wheel format and 'pip wheel' command type: bug A confirmed bug or unintended behavior

Comments

@mhsmith
Copy link

mhsmith commented Jul 27, 2018

Environment

  • pip version: 10.0.1
  • Python version: 3.6
  • OS: Linux

Description
WheelBuilder in https://github.com/pypa/pip/blob/master/src/pip/_internal/wheel.py takes a no_clean argument, but doesn't do anything with it. As a result, setup.py clean is unconditionally executed whether the build is successful or not.

I just had a 20 minute build process fail at the last step, after which pip deleted the entire build directory, making it impossible to investigate the problem. You might want to consider whether this is a good default behaviour. But in any case, --no-clean should actually prevent the clean.

#2779 is related, but involves a different area.

@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label Aug 20, 2018
@chrahunt chrahunt added C: wheel The wheel format and 'pip wheel' command type: bug A confirmed bug or unintended behavior labels Jul 23, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jul 23, 2019
@ziebam
Copy link
Contributor

ziebam commented Oct 2, 2021

Using the --no-clean flag on the current pip version (21.3.dev0) works correctly. I'm not sure which PR fixed it, but I think this issue can be closed.

@sbidoul
Copy link
Member

sbidoul commented Oct 2, 2021

--no-clean controls the cleanup of temporary directories created by pip.
But there is indeed an unconditional call to setup.py clean after a setup.py bdist_wheel failure.
I'm not sure why it is so. That is legacy behaviour which does not occur for projects using pyproject.toml.

@ziebam
Copy link
Contributor

ziebam commented Oct 3, 2021

Would a simple check (i.e. if not req.use_pep517: -> if not req.use_pep517 and [check here that --no-clean isn't set]: suffice or is it a more involved fix? In the first case I'd be willing to provide a PR.

@sbidoul
Copy link
Member

sbidoul commented Oct 3, 2021

Maybe ? Or we could simply just stop calling setup.py clean. Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: wheel The wheel format and 'pip wheel' command type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants