diff --git a/.circleci/config.yml b/.circleci/config.yml index 4543585c54..bcbacbe3bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: # Run st2 Integration tests integration: docker: - - image: circleci/python:2.7 + - image: circleci/python:3.6 - image: mongo:4.0 - image: rabbitmq:3 working_directory: ~/st2 @@ -79,7 +79,7 @@ jobs: # Run st2 Lint Checks lint: docker: - - image: circleci/python:2.7 + - image: circleci/python:3.6 - image: mongo:4.0 - image: rabbitmq:3 working_directory: ~/st2 @@ -113,7 +113,7 @@ jobs: resource_class: large docker: # The primary container is an instance of the first list image listed. Your build commands run in this container. - - image: circleci/python:2.7 + - image: circleci/python:3.6 working_directory: ~/st2 environment: - DISTROS: "xenial bionic el7 el8" diff --git a/.travis.yml b/.travis.yml index a5ace4e351..ea4d350591 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,12 @@ branches: - master - /^v[0-9]+\.[0-9]+$/ +python: + - "3.6" + # - "3.7" + # - "3.8" + # - "3.9" + env: global: - IS_NIGHTLY_BUILD=$([ "${TRAVIS_EVENT_TYPE}" = "cron" ] && echo "yes" || echo "no") @@ -22,8 +28,7 @@ env: - NOSE_TIME=$([ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${IS_NIGHTLY_BUILD}" = "no" ] && echo "yes" || echo "no") # Travis-specific st2.conf (with travis user instead of stanley) - ST2_CONF=conf/st2.travis.conf -jobs: - include: + jobs: # NOTE: We combine builds because Travis offers a maximum of 5 concurrent # builds and having 6 tasks / builds means 1 tasks will need to wait for one # of the other 5 tasks to finish before it can start @@ -36,25 +41,22 @@ jobs: # If you rename or reorder make targets in TASK, you may need to adjust: # scripts/travis/install-requirements.sh # scripts/travis/run-nightly-make-task-if-exists.sh - - name: "Unit Tests (Python 2.7 MongoDB 4.0)" - python: 2.7 - env: TASK=ci-unit CACHE_NAME=py2 PYTHON_VERSION=python2.7 COMMAND_THRESHOLD=700 + - TASK=ci-checks COMMAND_THRESHOLD=300 + + - TASK=compilepy3 COMMAND_THRESHOLD=300 - - name: "Integration Tests (Python 2.7)" - python: 2.7 - env: TASK=ci-integration CACHE_NAME=py2 PYTHON_VERSION=python2.7 COMMAND_THRESHOLD=700 + - TASK=ci-packs-tests COMMAND_THRESHOLD=300 - - name: "Lint Checks, Packs Tests (Python 3.6)" - python: 3.6 - env: TASK="ci-checks ci-packs-tests" CACHE_NAME=py3 PYTHON_VERSION=python3.6 COMMAND_THRESHOLD=430 + - TASK=ci-unit COMMAND_THRESHOLD=300 - - name: "Unit Tests, Pack Tests (Python 3.6)" - python: 3.6 - env: TASK="compilepy3 ci-py3-unit ci-py3-packs-tests" CACHE_NAME=py3 PYTHON_VERSION=python3.6 COMMAND_THRESHOLD=750 + - TASK=ci-integration COMMAND_THRESHOLD=300 - - name: "Integration Tests (Python 3.6)" - python: 3.6 - env: TASK="ci-py3-integration" CACHE_NAME=py3 PYTHON_VERSION=python3.6 COMMAND_THRESHOLD=770 +# jobs: +# fast_finish: true +# allow_failures: +# - python: "3.7" +# - python: "3.8" +# - python: "3.9" addons: apt: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f37976cb05..c69ede37dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -45,6 +45,9 @@ Removed ~~~~~~~~ * Removed check-licence script (cleanup) #5092 Contributed by @kroustou +* Updated Makefile and CI to use Python 3 only, removing Python 2 (cleanup) #5090 + + Contributed by @blag 3.3.0 - October 06, 2020 ------------------------ diff --git a/Makefile b/Makefile index 69a3ea46eb..49e75ab8c1 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,8 @@ else VIRTUALENV_COMPONENTS_DIR ?= virtualenv-components endif -PYTHON_VERSION ?= $(shell if [ -z "`which python3.6`" ]; then echo "python2.7"; else echo "python3.6"; fi) +# Assign PYTHON_VERSION if it doesn't already exist +PYTHON_VERSION ?= python3 BINARIES := bin @@ -50,11 +51,7 @@ COMPONENTS_TEST_MODULES_COMMA := $(subst $(space_char),$(comma),$(COMPONENTS_TES COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.* COVERAGE_GLOBS_QUOTED := $(foreach glob,$(COVERAGE_GLOBS),'$(glob)') -ifeq ($(PYTHON_VERSION),python2.7) - REQUIREMENTS := test-requirements-py27.txt requirements.txt -else - REQUIREMENTS := test-requirements.txt requirements.txt -endif +REQUIREMENTS := test-requirements.txt requirements.txt # Pin common pip version here across all the targets # Note! Periodic maintenance pip upgrades are required to be up-to-date with the latest pip security fixes and updates @@ -112,7 +109,7 @@ all: requirements configgen check tests # Target for debugging Makefile variable assembly .PHONY: play play: - @echo PYTHON_VERSION=$(PYTHON_VERSION) + @echo PYTHON_VERSION=$(PYTHON_VERSION) \($$($(PYTHON_VERSION) --version)\) @echo @echo COVERAGE_GLOBS=$(COVERAGE_GLOBS_QUOTED) @echo @@ -233,7 +230,7 @@ check-python-packages: @echo "" @echo "================== CHECK PYTHON PACKAGES ====================" @echo "" - test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_COMPONENTS_DIR) --no-download --system-site-packages + test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_COMPONENTS_DIR) --system-site-packages @for component in $(COMPONENTS_WITHOUT_ST2TESTS); do \ echo "==========================================================="; \ echo "Checking component:" $$component; \ @@ -424,17 +421,11 @@ lint: requirements .lint .PHONY: clean clean: .cleanpycs -.PHONY: compile -compile: - @echo "======================= compile ========================" - @echo "------- Compile all .py files (syntax check test - Python 2) ------" - @if python -c 'import compileall,re; compileall.compile_dir(".", rx=re.compile(r"/virtualenv|virtualenv-osx|virtualenv-py3|.tox|.git|.venv-st2devbox"), quiet=True)' | grep .; then exit 1; else exit 0; fi - .PHONY: compilepy3 compilepy3: @echo "======================= compile ========================" @echo "------- Compile all .py files (syntax check test - Python 3) ------" - @if python3 -c 'import compileall,re; compileall.compile_dir(".", rx=re.compile(r"/virtualenv|virtualenv-osx|virtualenv-py3|.tox|.git|.venv-st2devbox|./st2tests/st2tests/fixtures/packs/test"), quiet=True)' | grep .; then exit 1; else exit 0; fi + python3 -m compileall -f -q -x 'virtualenv|virtualenv-osx|virtualenv-py3|.tox|.git|.venv-st2devbox|./st2tests/st2tests/fixtures/packs/test' . .PHONY: .cleanpycs .cleanpycs: @@ -450,7 +441,7 @@ compilepy3: .st2common-circular-dependencies-check: @echo "Checking st2common for circular dependencies" find ${ROOT_DIR}/st2common/st2common/ -name \*.py -type f -print0 | xargs -0 cat | grep st2reactor ; test $$? -eq 1 - find ${ROOT_DIR}/st2common/st2common/ \( -name \*.py ! -name runnersregistrar\.py -name \*.py ! -name compat\.py | -name inquiry\.py \) -type f -print0 | xargs -0 cat | grep st2actions ; test $$? -eq 1 + find ${ROOT_DIR}/st2common/st2common/ \( -name \*.py ! -name runnersregistrar\.py -name \*.py ! -name compat\.py ! -name inquiry\.py \) -type f -print0 | xargs -0 cat | grep st2actions ; test $$? -eq 1 find ${ROOT_DIR}/st2common/st2common/ -name \*.py -type f -print0 | xargs -0 cat | grep st2api ; test $$? -eq 1 find ${ROOT_DIR}/st2common/st2common/ -name \*.py -type f -print0 | xargs -0 cat | grep st2auth ; test $$? -eq 1 find ${ROOT_DIR}/st2common/st2common/ -name \*.py -type f -print0 | xargs -0 cat | grep st2debug; test $$? -eq 1 @@ -635,7 +626,7 @@ tests: pytests pytests: compilepy3 requirements .flake8 .pylint .pytests-coverage .PHONY: .pytests -.pytests: compile .configgen .generate-api-spec .unit-tests clean +.pytests: compilepy3 .configgen .generate-api-spec .unit-tests clean .PHONY: .pytests-coverage .pytests-coverage: .unit-tests-coverage-html clean @@ -969,31 +960,7 @@ debs: ci: ci-checks ci-unit ci-integration ci-packs-tests .PHONY: ci-checks -ci-checks: compilepy3 .generated-files-check .pylint .flake8 check-requirements check-sdist-requirements .st2client-dependencies-check .st2common-circular-dependencies-check circle-lint-api-spec .rst-check .st2client-install-check check-python-packages - -.PHONY: ci-py3-unit -ci-py3-unit: - @echo - @echo "==================== ci-py3-unit ====================" - @echo - NOSE_WITH_TIMER=$(NOSE_WITH_TIMER) tox -e py36-unit -vv - -.PHONY: ci-py3-packs-tests -ci-py3-packs-tests: - @echo - @echo "==================== ci-py3-packs-tests ====================" - @echo - NOSE_WITH_TIMER=$(NOSE_WITH_TIMER) tox -e py36-packs -vv - -.PHONY: ci-py3-integration -ci-py3-integration: requirements .ci-prepare-integration .ci-py3-integration - -.PHONY: .ci-py3-integration -.ci-py3-integration: - @echo - @echo "==================== ci-py3-integration ====================" - @echo - NOSE_WITH_TIMER=$(NOSE_WITH_TIMER) tox -e py36-integration -vv +ci-checks: .generated-files-check .pylint .flake8 check-requirements check-sdist-requirements .st2client-dependencies-check .st2common-circular-dependencies-check circle-lint-api-spec .rst-check .st2client-install-check check-python-packages .PHONY: .rst-check .rst-check: diff --git a/st2actions/bin/st2actionrunner b/st2actions/bin/st2actionrunner index 519c3dc4c8..72cec358f7 100755 --- a/st2actions/bin/st2actionrunner +++ b/st2actions/bin/st2actionrunner @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2actions/bin/st2notifier b/st2actions/bin/st2notifier index c667d2bece..dc5d49e4a1 100755 --- a/st2actions/bin/st2notifier +++ b/st2actions/bin/st2notifier @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2actions/bin/st2resultstracker b/st2actions/bin/st2resultstracker index a8cdcc921b..0dae3ad493 100755 --- a/st2actions/bin/st2resultstracker +++ b/st2actions/bin/st2resultstracker @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2actions/bin/st2scheduler b/st2actions/bin/st2scheduler index 9984c53cfd..ef00cda156 100755 --- a/st2actions/bin/st2scheduler +++ b/st2actions/bin/st2scheduler @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2actions/bin/st2workflowengine b/st2actions/bin/st2workflowengine index 85b43b97b9..aa92d2487e 100755 --- a/st2actions/bin/st2workflowengine +++ b/st2actions/bin/st2workflowengine @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2api/bin/st2api b/st2api/bin/st2api index 83cd46c461..d40e91cae2 100755 --- a/st2api/bin/st2api +++ b/st2api/bin/st2api @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 import sys from st2api import cmd diff --git a/st2auth/bin/st2auth b/st2auth/bin/st2auth index 18523da5a4..62f50e6614 100755 --- a/st2auth/bin/st2auth +++ b/st2auth/bin/st2auth @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2client/Makefile b/st2client/Makefile index 92e7d04c4e..9d6cf70a66 100644 --- a/st2client/Makefile +++ b/st2client/Makefile @@ -1,6 +1,6 @@ # <<<< TO DEPRICATE SHELL := /bin/bash -PY27 := /usr/bin/python2.7 +PY3 := /usr/bin/python3 RPM_ROOT=~/rpmbuild RPM_SOURCES_DIR := $(RPM_ROOT)/SOURCES/ RPM_SPECS_DIR := $(RPM_ROOT)/SPECS/ @@ -10,7 +10,7 @@ COMPONENTS := st2client .PHONY: rpm rpm: - $(PY27) setup.py bdist_rpm --python=$(PY27) + $(PY3) setup.py bdist_rpm --python=$(PY3) mkdir -p $(RPM_ROOT)/RPMS/noarch cp dist/$(COMPONENTS)*noarch.rpm $(RPM_ROOT)/RPMS/noarch/$(COMPONENTS)-$(VER)-$(RELEASE).noarch.rpm mkdir -p $(RPM_ROOT)/SRPMS @@ -19,7 +19,7 @@ rpm: .PHONY: deb deb: - $(PY27) setup.py --command-packages=stdeb.command bdist_deb + $(PY3) setup.py --command-packages=stdeb.command bdist_deb mkdir -p ~/debbuild cp deb_dist/python-$(COMPONENTS)*-1_all.deb ~/debbuild/$(COMPONENTS)_$(VER)-$(RELEASE)_amd64.deb rm -Rf dist deb_dist $(COMPONENTS)-$(VER).tar.gz $(COMPONENTS).egg-info ChangeLog AUTHORS build diff --git a/st2client/setup.py b/st2client/setup.py index 76659ccb28..916b282301 100644 --- a/st2client/setup.py +++ b/st2client/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # diff --git a/st2common/bin/paramiko_ssh_evenlets_tester.py b/st2common/bin/paramiko_ssh_evenlets_tester.py index 24c0adee40..49a42545f8 100755 --- a/st2common/bin/paramiko_ssh_evenlets_tester.py +++ b/st2common/bin/paramiko_ssh_evenlets_tester.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # diff --git a/st2common/bin/st2-bootstrap-rmq b/st2common/bin/st2-bootstrap-rmq index 5b2aaf3326..9be58c0fc7 100755 --- a/st2common/bin/st2-bootstrap-rmq +++ b/st2common/bin/st2-bootstrap-rmq @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2common/bin/st2-cleanup-db b/st2common/bin/st2-cleanup-db index f987d4f3d3..a03ff42548 100755 --- a/st2common/bin/st2-cleanup-db +++ b/st2common/bin/st2-cleanup-db @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2common/bin/st2-generate-schemas b/st2common/bin/st2-generate-schemas index c23a699f30..669a0f7936 100755 --- a/st2common/bin/st2-generate-schemas +++ b/st2common/bin/st2-generate-schemas @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with diff --git a/st2common/bin/st2-register-content b/st2common/bin/st2-register-content index e3f88a6684..e0f813e178 100755 --- a/st2common/bin/st2-register-content +++ b/st2common/bin/st2-register-content @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2common/bin/st2-validate-pack-config b/st2common/bin/st2-validate-pack-config index 516c35c474..cef5490559 100755 --- a/st2common/bin/st2-validate-pack-config +++ b/st2common/bin/st2-validate-pack-config @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2debug/bin/st2-submit-debug-info b/st2debug/bin/st2-submit-debug-info index 697156d62e..cb1fb6f599 100755 --- a/st2debug/bin/st2-submit-debug-info +++ b/st2debug/bin/st2-submit-debug-info @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2exporter/bin/st2exporter b/st2exporter/bin/st2exporter index 6bc04e35e8..8e787f15e4 100755 --- a/st2exporter/bin/st2exporter +++ b/st2exporter/bin/st2exporter @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 import sys from st2exporter.cmd import st2exporter_starter diff --git a/st2reactor/bin/st2-rule-tester b/st2reactor/bin/st2-rule-tester index b12ca2c380..3ede4e38d3 100755 --- a/st2reactor/bin/st2-rule-tester +++ b/st2reactor/bin/st2-rule-tester @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2reactor/bin/st2-trigger-refire b/st2reactor/bin/st2-trigger-refire index a73a9273b5..01f8784a6d 100755 --- a/st2reactor/bin/st2-trigger-refire +++ b/st2reactor/bin/st2-trigger-refire @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2reactor/bin/st2garbagecollector b/st2reactor/bin/st2garbagecollector index 39534f8cb3..8b2e57bd56 100755 --- a/st2reactor/bin/st2garbagecollector +++ b/st2reactor/bin/st2garbagecollector @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2reactor/bin/st2rulesengine b/st2reactor/bin/st2rulesengine index 8faca8e6d8..3956c2be63 100755 --- a/st2reactor/bin/st2rulesengine +++ b/st2reactor/bin/st2rulesengine @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2reactor/bin/st2sensorcontainer b/st2reactor/bin/st2sensorcontainer index 173059e0a2..eab02c771e 100755 --- a/st2reactor/bin/st2sensorcontainer +++ b/st2reactor/bin/st2sensorcontainer @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2reactor/bin/st2timersengine b/st2reactor/bin/st2timersengine index 15244a4afa..bf730aa44a 100755 --- a/st2reactor/bin/st2timersengine +++ b/st2reactor/bin/st2timersengine @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. diff --git a/st2stream/bin/st2stream b/st2stream/bin/st2stream index 9f9198b582..ace04805b2 100755 --- a/st2stream/bin/st2stream +++ b/st2stream/bin/st2stream @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 import sys from st2stream import cmd diff --git a/tools/st2-setup-examples b/tools/st2-setup-examples index d15e2418e3..d98916f059 100644 --- a/tools/st2-setup-examples +++ b/tools/st2-setup-examples @@ -2,7 +2,6 @@ echo "Installer for the examples pack..." -PY27=`which python2.7` PACK="examples" USRPATH="/usr/share/doc/st2" TESTSPATH="/opt/stackstorm/packs" @@ -23,7 +22,7 @@ echo -e "Bootstrapping virtualenv for ${PACK} pack..." if [ -f ${TESTSPATH}/${PACK}/requirements.txt ]; then echo "Creating virtualenv for ${PACK}..." mkdir -p /opt/stackstorm/virtualenvs - virtualenv -p ${PY27} --system-site-packages /opt/stackstorm/virtualenvs/${PACK} + virtualenv /opt/stackstorm/virtualenvs/${PACK} echo "Installing requirements.txt for ${PACK}..." pip install -r ${TESTSPATH}/${PACK}/requirements.txt -E /opt/stackstorm/virtualenvs/${PACK} fi diff --git a/tools/st2-setup-tests b/tools/st2-setup-tests index bcd9102ea7..a6d2297a1b 100644 --- a/tools/st2-setup-tests +++ b/tools/st2-setup-tests @@ -8,7 +8,6 @@ if [ -z $1 ]; then fi PACK=$1 -PY27=`which python2.7` TESTSBRANCH=$2 if [ -z "$TESTSBRANCH" ]; then @@ -57,7 +56,7 @@ echo -e "Bootstrapping virtualenv for ${PACK} pack..." if [ -f ${TESTSPATH}/${PACK}/requirements.txt ]; then echo "Creating virtualenv for ${PACK}..." mkdir -p ${VENVSPATH} - virtualenv -p ${PY27} --system-site-packages ${VENVSPATH}/${PACK} + virtualenv ${VENVSPATH}/${PACK} echo "Installing requirements.txt for ${PACK}..." source ${VENVSPATH}/${PACK}/bin/activate pip install -r ${TESTSPATH}/${PACK}/requirements.txt