Skip to content

Commit 4d42b89

Browse files
committed
Fix copying distribution files from checkout
1 parent 814c54f commit 4d42b89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

noxfile.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ def build_release(session):
221221

222222
tmp_dist_paths = (build_dir / p for p in tmp_dists)
223223
session.log(f"# Copying dists from {build_dir}")
224-
shutil.rmtree('dist', ignore_errors=True) # remove empty `dist/`
225-
for dist in tmp_dist_paths:
226-
session.log(f"# Copying {dist}")
227-
shutil.copy(dist, 'dist')
224+
os.makedirs('dist', exist_ok=True)
225+
for dist, final in zip(tmp_dist_paths, tmp_dists):
226+
session.log(f"# Copying {dist} to {final}")
227+
shutil.copy(dist, final)
228228

229229

230230
def build_dists(session):

0 commit comments

Comments
 (0)