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:
parent
c1fda9a356
commit
8672802e78
1 changed files with 4 additions and 2 deletions
|
|
@ -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/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue