From 540f2a62e736d2bb528ffef12510a58d4fa212f5 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Wed, 14 Feb 2024 22:23:21 -0800 Subject: [PATCH] Fix tmp dir cleanup. 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. --- scripts/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package.py b/scripts/package.py index 1dbb7b699..d7e6a6e58 100755 --- a/scripts/package.py +++ b/scripts/package.py @@ -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