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)