Skip to content

Commit

Permalink
only install twine and wheel under latest PYTHONS version
Browse files Browse the repository at this point in the history
  • Loading branch information
chaimleib committed Aug 3, 2020
1 parent 9d58a88 commit c4bc2af
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,7 @@ PYTHON_MINORS:=$(shell \
# PyPI server name, as specified in ~/.pypirc
# See http://peterdowns.com/posts/first-time-with-pypi.html
PYPI=pypitest

TWINE=$(shell \
pyenv shell $(shell echo "$(PYTHONS)" | tr ' ' '\n' | tail -n1) ;\
if twine --version &>/dev/null; then \
echo twine ;\
elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \
echo '~/Library/Python/3.7/bin/twine' ;\
else \
echo twine ;\
fi \
)
TWINE=twine

# default target
all: test
Expand Down Expand Up @@ -112,9 +102,15 @@ pyenv-install-versions: pyenv-is-installed
export PYENV_VERSION=$$pyver; \
pip install -U pip; \
pip install -U pytest; \
pip install -U twine; \
pip install -U wheel; \
done | grep -v 'Requirement already satisfied, skipping upgrade'
# twine and wheel needed only under latest PYTHONS version for uploading to PYPI
export PYENV_VERSION=$(shell \
echo $(PYTHONS) | \
tr ' ' '\n' | \
tail -n1 \
)
pip install -U twine
pip install -U wheel
pyenv rehash

# for debugging the Makefile
Expand Down

0 comments on commit c4bc2af

Please sign in to comment.