Skip to content

Commit

Permalink
Fix tmp dir cleanup.
Browse files Browse the repository at this point in the history
The deploy of v2.2.0 failed, much like v2.1.164, due to
`tox -epackage ...` leaving non-PyPI artifacts in the `dist/` dir. This
time, the issue was `dist/.tmp`. Fix cleanup of this tmp dir and,
finally, fix the PyPI deploy in the release process.
  • Loading branch information
jsirois committed Feb 15, 2024
1 parent c783c64 commit 540f2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def build_pex_dists(
) -> Iterator[PurePath]:
tmp_dir = DIST_DIR / ".tmp"
tmp_dir.mkdir(parents=True, exist_ok=True)
atexit.register(shutil.rmtree, tmp_dir, ignore_errors=True)
out_dir = tempfile.mkdtemp(dir=tmp_dir)
atexit.register(shutil.rmtree, out_dir, ignore_errors=True)

output = None if verbose else subprocess.DEVNULL

Expand Down

0 comments on commit 540f2a6

Please sign in to comment.