From 675c9904868362e789e43380d92c97f9959f5440 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 27 May 2025 14:59:10 +1000 Subject: [PATCH] docs: add comments to classifiers stuff --- scripts/build_wheel.sh | 2 ++ scripts/check_classifiers.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/scripts/build_wheel.sh b/scripts/build_wheel.sh index df421ceb59..ba9a3854e2 100755 --- a/scripts/build_wheel.sh +++ b/scripts/build_wheel.sh @@ -38,6 +38,8 @@ echo -e "${BGREEN}HEAD${RESET}:" git_show HEAD echo +# If the classifiers are invalid, publishing to PyPI will fail but the build will succeed. +# It's a fast check, do it early. echo "Checking pyproject classifiers..." python3 ./check_classifiers.py ../pyproject.toml echo diff --git a/scripts/check_classifiers.py b/scripts/check_classifiers.py index 7120049df6..de2ccd073e 100644 --- a/scripts/check_classifiers.py +++ b/scripts/check_classifiers.py @@ -3,6 +3,9 @@ import sys import urllib.request from pathlib import Path +# This script checks the classifiers in a pyproject.toml file against the official Trove classifier list. +# If the classifiers are invalid, PyPI will reject the package upload. + # Step 1: Get pyproject.toml path from args if len(sys.argv) != 2: print(f"Usage: {sys.argv[0]} path/to/pyproject.toml", file=sys.stderr)