-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Make --no-clean work in tox #2689
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
Conversation
The problem is that --no-clean will retain the build directory, but deletes everything in the build directory. Ultimately this makes --no-clean useless because the reason to retain the build directory is to investigate the contents.
This fixes the bug demonstrated in ef522ac while not introducing any regressions. There's another call to .remove_temporary_source() in a different place which already tests if --no-clean was specified.
what pip version? can you provide a paste. here's a paste of it preserving the contents of the build dir in v6.1.1 |
Demo code: https://gist.github.com/habnabit/d8e8f5c5c925d19c5ece This is the smallest I can make the example; I haven't tried very hard to factor tox out, but it might certainly be related to tox. |
the problem seems to be when installing from local dists or local projects, not a problem in general. in your tox example, tox installs from a local zip, so it fits the problem. I opened #2779 so we have an issue for this. as for your fix, I'm not sure, I need to look closer... |
@rbtcollins yes, this is primarily for debugging. I can't think of a non-debugging use case offhand. |
Accidentally closed this, reopening. Sorry! |
Hello! As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the If you do nothing, this Pull Request will be automatically migrated by @BrownTruck for you. If you would like to retain control over this pull request then you should resubmit it against the If you choose to migrate this Pull Request yourself, here is an example message that you can copy and paste:
If this pull request is no longer needed, please feel free to close it. |
This Pull Request has been automatically migrated to #3754 to reparent it to the |
Right now,
--no-clean
will preserve the build directory that pip created during the installation, but everything in the directory is deleted. It's not useful to keep the build directory if there's nothing in it, so this fixes the issue by not deleting things inside the build directory unconditionally.