1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Move tmp dir logging to build_release

This commit is contained in:
Sviatoslav Sydorenko 2020-01-28 16:45:42 +01:00
parent 01c4553754
commit daba4b4c9e
No known key found for this signature in database
GPG key ID: 9345E8FEA89CA455

View file

@ -209,9 +209,6 @@ def mk_tmp_git_checkout(nox_session, target_commitish: str):
with tempfile.TemporaryDirectory() as tmp_dir_path:
tmp_dir = pathlib.Path(tmp_dir_path)
git_checkout_dir = tmp_dir / f'pip-build-{target_commitish}'
nox_session.log(
f"# Creating a temporary Git checkout at {git_checkout_dir!s}",
)
nox_session.run(
'git', 'worktree', 'add', '--force', '--checkout',
str(git_checkout_dir), str(target_commitish),
@ -245,6 +242,10 @@ def build_release(session):
session.install("setuptools", "wheel", "twine")
with mk_tmp_git_checkout(session, version) as build_dir_path:
session.log(
"# Start the build in an isolated, "
f"temporary Git checkout at {build_dir_path!s}",
)
with workdir(session, build_dir_path):
build_dists(session)