Fix GitLab CI pypi-twine stage for Python 3.12+ externally-managed-environment

- Create virtual environment for twine operations instead of system-wide installs
- Use python3 -m build instead of deprecated setup.py commands
- Resolves PEP 668 externally-managed-environment restrictions in CI
This commit is contained in:
Russell Ballestrini 2025-07-27 13:58:57 -04:00
parent c1fda9a356
commit 8672802e78

View file

@ -59,7 +59,9 @@ pypi-twine:
only:
- tags
script:
- python3 -m venv twine_env
- source twine_env/bin/activate
- pip install --upgrade pip
- pip install twine
- python3 setup.py sdist bdist_wheel
- pip install twine build
- python3 -m build
- twine upload dist/*