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

Make --no-clean work in tox #2689

Closed
wants to merge 2 commits into
base: develop
from

Conversation

Projects
None yet
5 participants
@habnabit

habnabit commented Apr 15, 2015

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.

habnabit added some commits Apr 15, 2015

Make a cleanup test fail to demonstrate bugginess.
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.
Remove an unconditional .remove_temporary_source()
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.
@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Apr 15, 2015

Contributor

what pip version? can you provide a paste.
global build dir or in a virtualenv?

here's a paste of it preserving the contents of the build dir in v6.1.1

https://gist.github.com/qwcode/7ac7377b5a88872b0343

Contributor

qwcode commented Apr 15, 2015

what pip version? can you provide a paste.
global build dir or in a virtualenv?

here's a paste of it preserving the contents of the build dir in v6.1.1

https://gist.github.com/qwcode/7ac7377b5a88872b0343

@habnabit

This comment has been minimized.

Show comment
Hide comment
@habnabit

habnabit Apr 16, 2015

Demo code: https://gist.github.com/habnabit/d8e8f5c5c925d19c5ece
Output for me: https://gist.github.com/habnabit/e97a07d7bda97befb0c4

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.

habnabit commented Apr 16, 2015

Demo code: https://gist.github.com/habnabit/d8e8f5c5c925d19c5ece
Output for me: https://gist.github.com/habnabit/e97a07d7bda97befb0c4

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.

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode May 13, 2015

Contributor

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...

Contributor

qwcode commented May 13, 2015

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...

@qwcode qwcode changed the title from Make --no-clean actually do something useful (keep the files in the build directory) to Make --no-clean work in tox May 13, 2015

@rbtcollins

This comment has been minimized.

Show comment
Hide comment
@rbtcollins

rbtcollins May 14, 2015

Contributor

@habnabit can I ask what this is for? we were debating the usefulness of this flag earlier today on the #pypa-dev IRC channel... we think its mainly debugging. I'm asking because the resolver work (PR #2716) necessitates changing the build cache, and I've taken a bit of a cleaver to it...

Contributor

rbtcollins commented May 14, 2015

@habnabit can I ask what this is for? we were debating the usefulness of this flag earlier today on the #pypa-dev IRC channel... we think its mainly debugging. I'm asking because the resolver work (PR #2716) necessitates changing the build cache, and I've taken a bit of a cleaver to it...

@habnabit

This comment has been minimized.

Show comment
Hide comment
@habnabit

habnabit May 29, 2015

@rbtcollins yes, this is primarily for debugging. I can't think of a non-debugging use case offhand.

habnabit commented May 29, 2015

@rbtcollins yes, this is primarily for debugging. I can't think of a non-debugging use case offhand.

@dstufft dstufft closed this May 18, 2016

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft May 18, 2016

Member

Accidentally closed this, reopening. Sorry!

Member

dstufft commented May 18, 2016

Accidentally closed this, reopening. Sorry!

@dstufft dstufft reopened this May 18, 2016

@BrownTruck

This comment has been minimized.

Show comment
Hide comment
@BrownTruck

BrownTruck May 19, 2016

Contributor

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 master branch. However, this Pull Request was made against the develop branch so it will need to be resubmitted against master.

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 master branch, closing and referencing the original Pull Request.

If you choose to migrate this Pull Request yourself, here is an example message that you can copy and paste:

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.

---

*This was migrated from pypa/pip#2689 to reparent it to the ``master`` branch. Please see original pull request for any previous discussion.*

If this pull request is no longer needed, please feel free to close it.

Contributor

BrownTruck commented May 19, 2016

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 master branch. However, this Pull Request was made against the develop branch so it will need to be resubmitted against master.

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 master branch, closing and referencing the original Pull Request.

If you choose to migrate this Pull Request yourself, here is an example message that you can copy and paste:

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.

---

*This was migrated from pypa/pip#2689 to reparent it to the ``master`` branch. Please see original pull request for any previous discussion.*

If this pull request is no longer needed, please feel free to close it.

@BrownTruck

This comment has been minimized.

Show comment
Hide comment
@BrownTruck

BrownTruck May 26, 2016

Contributor

This Pull Request has been automatically migrated to #3754 to reparent it to the master branch. Please see the new pull request for any new discussion.

Contributor

BrownTruck commented May 26, 2016

This Pull Request has been automatically migrated to #3754 to reparent it to the master branch. Please see the new pull request for any new discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment