Temporary patch to try different options to install venv in travis
@@ -376,10 +376,7 @@ flake8: requirements .flake8
@echo
@echo "==================== st2client install check ===================="
@echo
- test -f $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_ST2CLIENT_DIR) || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_ST2CLIENT_DIR) --no-download
-
- test -f $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate
- ls -l $(VIRTUALENV_ST2CLIENT_DIR)
+ test -f $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_ST2CLIENT_DIR) --no-download --system-site-packages
# Setup PYTHONPATH in bash activate script...
# Delete existing entries (if any)
@@ -396,15 +393,18 @@ flake8: requirements .flake8
# NOTE We need to upgrade setuptools to avoid bug with dependency resolving in old versions
# Setuptools 42 added support for python_requires, which is used by the configparser package,
# which is required by the importlib-metadata package
- if [[ $(PYTHON_VERSION) == *"python2.7"* ]]; then \
- echo 'Upgrading pip==$(PIP_VERSION) in python2.7 virtualenv'; \
- $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"; \
- $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==44.1.0"; \
- else \
- echo 'Upgrading pip==$(PIP_VERSION) in python3.x virtualenv'; \
- $(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)"; \
- $(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "setuptools==44.1.0"; \
- fi
+ $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
+ $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==44.1.0"
+
+ #if [[ $(PYTHON_VERSION) == *"python2.7"* ]]; then \
+ # echo 'Upgrading pip==$(PIP_VERSION) in python2.7 virtualenv'; \
+ # $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"; \
+ # $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==44.1.0"; \
+ #else \
+ # echo 'Upgrading pip==$(PIP_VERSION) in python3.x virtualenv'; \
+ # $(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)"; \
+ # $(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "setuptools==44.1.0"; \
+ #fi
$(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/python setup.py install ; cd ..
$(VIRTUALENV_ST2CLIENT_DIR)/bin/st2 --version
