Add twine-venv target in /tmp for PyPI uploads
Uses a persistent virtualenv in /tmp/twine-venv to avoid relying on system python/twine in CI.
This commit is contained in:
parent
00edd84398
commit
c7a6325cf8
2 changed files with 20 additions and 4 deletions
|
|
@ -64,7 +64,4 @@ pypi-twine:
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
script:
|
script:
|
||||||
#- pip install --upgrade pip
|
- make twine-upload
|
||||||
#- pip install twine
|
|
||||||
- python3 setup.py sdist bdist_wheel
|
|
||||||
- twine upload dist/*
|
|
||||||
|
|
|
||||||
19
Makefile
19
Makefile
|
|
@ -124,6 +124,25 @@ http: venv
|
||||||
@echo "Starting simple HTTP server on port 8000..."
|
@echo "Starting simple HTTP server on port 8000..."
|
||||||
$(PYTHON) -m http.server 8000
|
$(PYTHON) -m http.server 8000
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Twine Upload Target (uses /tmp venv to avoid system python)
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
TWINE_VENV = /tmp/twine-venv
|
||||||
|
TWINE = $(TWINE_VENV)/bin/twine
|
||||||
|
|
||||||
|
$(TWINE_VENV)/bin/twine:
|
||||||
|
@echo "Creating twine virtualenv in $(TWINE_VENV)..."
|
||||||
|
python3 -m venv $(TWINE_VENV)
|
||||||
|
$(TWINE_VENV)/bin/pip install --upgrade pip twine
|
||||||
|
|
||||||
|
twine-venv: $(TWINE_VENV)/bin/twine
|
||||||
|
|
||||||
|
twine-upload: twine-venv
|
||||||
|
@echo "Building and uploading to PyPI..."
|
||||||
|
python3 setup.py sdist bdist_wheel
|
||||||
|
$(TWINE) upload dist/*
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Cleanup Target
|
# Cleanup Target
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue