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

Avoid interfering with auto-discovery when creating temporary directories #3704

Merged
merged 2 commits into from Nov 23, 2022

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Nov 22, 2022

Summary of changes

  • Modify temporary directory name to be hidden from auto-discovery

Closes #3692

Pull Request Checklist

@abravalheri abravalheri marked this pull request as ready for review November 22, 2022 20:03
@@ -385,7 +385,8 @@ def _build_with_temp_dir(self, setup_command, result_extension,

# Build in a temporary directory, then copy to the target.
os.makedirs(result_directory, exist_ok=True)
with tempfile.TemporaryDirectory(dir=result_directory) as tmp_dist_dir:
temp_opts = {"prefix": ".tmp-", "dir": result_directory}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temp directory here is created inside result_directory because this is the only place we can assume the current process has OS-level rights to write to the disk...

@abravalheri abravalheri merged commit 559f151 into pypa:main Nov 23, 2022
@abravalheri abravalheri deleted the issue-3692 branch November 23, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] autodiscovery for single-module layout causes build_wheel(".") to produce an empty wheel
1 participant