Skip to content

Commit c864b8c

Browse files
committed
Fix pip upgrade of setuptools in travis for py3 venv
1 parent f241109 commit c864b8c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,19 +390,19 @@ flake8: requirements .flake8
390390
touch $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate
391391
chmod +x $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate
392392

393+
# NOTE We need to upgrade setuptools to avoid bug with dependency resolving in old versions
394+
# Setuptools 42 added support for python_requires, which is used by the configparser package,
395+
# which is required by the importlib-metadata package
393396
if [[ $(PYTHON_VERSION) == *"python2.7"* ]]; then \
394-
echo 'Upgrading pip==$(PIP_VERSION) in python2.7 virtualenv' \
397+
echo 'Upgrading pip==$(PIP_VERSION) in python2.7 virtualenv'; \
395398
$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"; \
399+
$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==44.1.0"; \
396400
else \
397-
echo 'Upgrading pip==$(PIP_VERSION) in python3.x virtualenv' \
398-
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --user --upgrade "pip==$(PIP_VERSION)"; \
401+
echo 'Upgrading pip==$(PIP_VERSION) in python3.x virtualenv'; \
402+
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)"; \
403+
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "setuptools==44.1.0"; \
399404
fi
400405

401-
# NOTE We need to upgrade setuptools to avoid bug with dependency resolving in old versions
402-
# Setuptools 42 added support for python_requires, which is used by the configparser package,
403-
# which is required by the importlib-metadata package
404-
$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==44.1.0"
405-
406406
$(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/python setup.py install ; cd ..
407407
$(VIRTUALENV_ST2CLIENT_DIR)/bin/st2 --version
408408
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -c "import st2client"

0 commit comments

Comments
 (0)