Refactor Makefile to use python3 by default
@@ -15,7 +15,7 @@ else
VIRTUALENV_COMPONENTS_DIR ?= virtualenv-components
endif
-PYTHON_VERSION ?= python2.7
+PYTHON_VERSION ?= python3.6
BINARIES := bin
@@ -227,7 +227,7 @@ check-python-packages:
@echo "================== CHECK PYTHON PACKAGES ===================="
@echo ""
- test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_COMPONENTS_DIR) --no-download
+ test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_COMPONENTS_DIR)
@for component in $(COMPONENTS_WITHOUT_ST2TESTS); do \
echo "==========================================================="; \
echo "Checking component:" $$component; \
@@ -243,7 +243,7 @@ check-python-packages-nightly:
@echo "================== CHECK PYTHON PACKAGES ===================="
@echo ""
- test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_COMPONENTS_DIR) --no-download
+ test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_COMPONENTS_DIR)
@for component in $(COMPONENTS_WITHOUT_ST2TESTS); do \
echo "==========================================================="; \
echo "Checking component:" $$component; \
@@ -375,7 +375,7 @@ flake8: requirements .flake8
@echo
@echo "==================== st2client install check ===================="
@echo
- test -f $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_ST2CLIENT_DIR) --no-download
+ test -f $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_ST2CLIENT_DIR)
# Setup PYTHONPATH in bash activate script...
# Delete existing entries (if any)
@@ -585,7 +585,7 @@ virtualenv:
@echo
@echo "==================== virtualenv ===================="
@echo
- test -f $(VIRTUALENV_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_DIR) --no-download
+ test -f $(VIRTUALENV_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_DIR)
# Setup PYTHONPATH in bash activate script...
# Delete existing entries (if any)
