-
Notifications
You must be signed in to change notification settings - Fork 3k
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 release task build dists @ clean tmp checkout #7654
Conversation
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.
The overall flow looks about right to me, and the worktree checkout seems right to me? I didn't actually drive this fully, because, the sane-release-state checks are correctly blocking that and I need to eat lunch. :)
Some comments around code organization (since we have a tools/automation/release/__init__.py
file for putting helpers in), using of nox-provided helpers and some logging-related (soft) suggestions.
There's also a few minor nit-picks that definitely be ignored if you disagree, but it'd be nice if you'd incorporate them if you're ambivalent about them. :)
noxfile.py
Outdated
yield dir_path | ||
finally: | ||
nox_session.log(f"# Changing dir back to {orig_dir}") | ||
os.chdir(orig_dir) |
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.
nox's Session.chdir()
should be used here, to replace both this and the line above this: https://nox.readthedocs.io/en/stable/config.html#nox.sessions.Session.chdir
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.
Looks like it doesn't have any args for extra message :(
I wanted to emphasize that this is changing back.
noxfile.py
Outdated
session.log("# Checkout the master branch") | ||
session.run("git", "checkout", "master", external=True, silent=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.
Yay! ^>^
88e495f
to
d4bf0fa
Compare
Failing CI seems unrelated... |
Rebasing on master should fix the CI. :) |
This is a follow-up improvement for https://github.com/pypa/pip/pull/7624/files
This reverts commit 9c1a4d4.
Allow own `.nox/` runtime env files.
d4bf0fa
to
e23f44c
Compare
Co-Authored-By: Pradyun Gedam <[email protected]>
Co-Authored-By: Pradyun Gedam <[email protected]>
Co-Authored-By: Pradyun Gedam <[email protected]>
Co-Authored-By: Pradyun Gedam <[email protected]>
07df75d
to
5b05416
Compare
Co-Authored-By: Pradyun Gedam <[email protected]>
5b05416
to
6f1a43e
Compare
a94c450
to
9d592b3
Compare
Merged since this LGTM and, well, it's lingered for quite a while anyway. |
This is a follow-up of (and includes the commits from) #7631.
I did some hacking and submitting some PoC for the initial feedback.
The idea here is to checkout the given git ref under
/tmp
, build there and copy only the final dists back to the normal workdir.