Skip to content

Commit c4bc2af

Browse files
committed
only install twine and wheel under latest PYTHONS version
1 parent 9d58a88 commit c4bc2af

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Makefile

+9-13
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,7 @@ PYTHON_MINORS:=$(shell \
2424
# PyPI server name, as specified in ~/.pypirc
2525
# See http://peterdowns.com/posts/first-time-with-pypi.html
2626
PYPI=pypitest
27-
28-
TWINE=$(shell \
29-
pyenv shell $(shell echo "$(PYTHONS)" | tr ' ' '\n' | tail -n1) ;\
30-
if twine --version &>/dev/null; then \
31-
echo twine ;\
32-
elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \
33-
echo '~/Library/Python/3.7/bin/twine' ;\
34-
else \
35-
echo twine ;\
36-
fi \
37-
)
27+
TWINE=twine
3828

3929
# default target
4030
all: test
@@ -112,9 +102,15 @@ pyenv-install-versions: pyenv-is-installed
112102
export PYENV_VERSION=$$pyver; \
113103
pip install -U pip; \
114104
pip install -U pytest; \
115-
pip install -U twine; \
116-
pip install -U wheel; \
117105
done | grep -v 'Requirement already satisfied, skipping upgrade'
106+
# twine and wheel needed only under latest PYTHONS version for uploading to PYPI
107+
export PYENV_VERSION=$(shell \
108+
echo $(PYTHONS) | \
109+
tr ' ' '\n' | \
110+
tail -n1 \
111+
)
112+
pip install -U twine
113+
pip install -U wheel
118114
pyenv rehash
119115

120116
# for debugging the Makefile

0 commit comments

Comments
 (0)