-
-
Notifications
You must be signed in to change notification settings - Fork 537
Defend against parallel package builds via a file lock #1032
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
0de3d69
to
83def3d
Compare
We create a hard link (if possible, otherwise copy of the built package) inside a temp folder. This way subsequent sessions are free to remove dist folder and we also guarantee that the built package during the build is what tox environments use (even if the package gets rebuilt in the meantime).
9588075
to
8acf739
Compare
|
||
reader.addsubstitutions(distdir=config.distdir) | ||
config.distshare = reader.getpath("distshare", dist_share_default) | ||
self._make_thread_safe_path(config, "distshare", unique_id) | ||
config.temp_dir = reader.getpath("temp_dir", "{toxworkdir}/.tmp") |
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.
@gaborbernat if I'm reading this right, you forgot to add it to substitutions
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 meant as an internal implementation detail folder, not meant for public usage.
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.
Ah, the docs suggest otherwise...
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.
Well, I guess now it's supported.
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.
Hyrum's Law, huh?
This change recovers a missing `temp_dir` substitution. The docs for it were added in tox-dev#1032 but it never actually worked. Fixes tox-dev#1608
Resolves #1026.