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

Use a temp dir for pip-wheel-metadata #6325

Merged
merged 3 commits into from
Sep 5, 2019

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Mar 11, 2019

Fixes #6213.

The pip-wheel-metadata directory does not need to persist between invocations of pip, use a temporary directory instead of the current setup.py directory.

This wraps the code dealing with pip-wheel-metadata in with TempDirectory(delete=False) as temp_dir: and replaces self.setup_py_dir with temp_dir.

Tests fail because they're configured to not allow temp files after the tests end (AssertionError: temp files not expected). I'm not sure best how to fix this, suggestions welcome!

@pradyunsg
Copy link
Member

The temporary directory would need to get cleaned up as well.

@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label Mar 11, 2019
@cjerdonek
Copy link
Member

This issue also needs a regression test, which will also be useful for the refactoring TODO.

@hugovk
Copy link
Contributor Author

hugovk commented Mar 18, 2019

This issue also needs a regression test, which will also be useful for the refactoring TODO.

Pointers please! I had a look at the tests, but wasn't sure how to proceed.

@gaborbernat
Copy link

@cjerdonek ping 👍

@pradyunsg
Copy link
Member

Merging this right now. I'll file an issue for tracking the removal of atexit.register call over here.

@pradyunsg pradyunsg merged commit c23c52d into pypa:master Sep 5, 2019
@hugovk hugovk deleted the pip-wheel-metadata-in-tempdir branch September 5, 2019 08:05
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 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 type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip-wheel-metadata configurable
5 participants