From 8672802e786988a7e70df00221b7379fa246f9ae Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 27 Jul 2025 13:58:57 -0400 Subject: [PATCH] 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 --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b9568e..9e13111 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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/*