Fix mistake in PyPI release instructions, improve console output

This commit is contained in:
Brecht Van Lommel 2023-07-03 16:59:23 +02:00
parent 92334b94a6
commit 6ff7d0a796
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# PyPi Release Publishing # PyPI Release Publishing
### Setup ### Setup
@ -28,8 +28,8 @@ Check download page for Git hash.
Run checks: Run checks:
./upload-release.py --version X.X.X --hash abcd1234 --check ./upload-release.py --version X.X.X --git-hash abcd1234 --check
Upload: Upload:
./upload-release.py --version X.X.X --hash abcd1234 ./upload-release.py --version X.X.X --git-hash abcd1234

View File

@ -51,17 +51,19 @@ with tempfile.TemporaryDirectory() as tmp_dir:
# Unzip. # Unzip.
with zipfile.ZipFile(filepath, "r") as zipf: with zipfile.ZipFile(filepath, "r") as zipf:
zipf.extractall(path=tmp_dir) zipf.extractall(path=tmp_dir)
print("")
wheels = glob.glob(tmp_dir / "*.whl") wheels = glob.glob(str(tmp_dir / "*.whl"))
print("Wheels:") print("Wheels:")
print("\n".join(wheels)) print("\n".join(wheels))
if len(platforms) != len(wheels): if len(platforms) != len(wheels):
sys.stderr.write("Unexpected number of whl files.") sys.stderr.write("Unexpected number of whl files.")
sys.exit(1) sys.exit(1)
print("")
# Check and upload. # Check and upload.
print("Twine:") print("Twine:")
subprocess.run(["twine", "check", " ".join(wheels)], check=True) subprocess.run(["twine", "check"] + wheels, check=True)
if not args.check: if not args.check:
subprocess.run(["twine", "upload", "--repository", "bpy", "--verbose", " ".join(wheels)], check=True) subprocess.run(["twine", "upload", "--repository", "bpy", "--verbose"] + wheels, check=True)