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
Ensure the sandbox distdir exists when creating dists via PEP517. #16647
Conversation
Also fixes a docsite text alignment issue that didn't merit its own change.
|
PEP 517 does not specify explicitly that the directory must exist, but the example it gives appears to assume that. In any case, there should be no harm in creating it. Setuptools is fine with it and flit requires it. |
@@ -154,6 +155,7 @@ class DistBuildResult: | |||
wheel_config_settings = {wheel_config_settings_str} | |||
sdist_config_settings = {sdist_config_settings_str} | |||
|
|||
os.makedirs(dist_dir, exist_ok=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fresh sandbox each time, so the exist_ok
should not be necessary in practice. But it's good to be defensive, in the unlikely event that a directory called dist
does exist in the input snapshot for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to cherry-picking. Probably to 2.13?
…ntsbuild#16647) Also fixes a docsite text alignment issue that didn't merit its own change.
…ntsbuild#16647) Also fixes a docsite text alignment issue that didn't merit its own change.
…ntsbuild#16647) Also fixes a docsite text alignment issue that didn't merit its own change.
Flit, at least, fails if this directory doesn't exist.
Also fixes a docsite text alignment issue that didn't merit its own change.