Skip to content

Commit 86924c8

Browse files
committed
Separate python2.7 test requirements to separate file
The dependency astroid in the test-requirements.txt has a conflict for python2.7. Create a separate test-requirements-py27.txt for python2.7 environment.
1 parent 63fc63c commit 86924c8

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
VIRTUALENV_COMPONENTS_DIR ?= virtualenv-components
1616
endif
1717

18-
PYTHON_VERSION ?= $(shell if [ -z "`which python3.6`" ]; then which python2.7; else which python3.6; fi)
18+
PYTHON_VERSION ?= $(shell if [ -z "`which python3.6`" ]; then echo "python2.7"; else echo "python3.6"; fi)
1919

2020
BINARIES := bin
2121

@@ -50,7 +50,12 @@ COMPONENTS_TEST_MODULES_COMMA := $(subst $(space_char),$(comma),$(COMPONENTS_TES
5050
COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.*
5151
COVERAGE_GLOBS_QUOTED := $(foreach glob,$(COVERAGE_GLOBS),'$(glob)')
5252

53-
REQUIREMENTS := test-requirements.txt requirements.txt
53+
ifeq ($(PYTHON_VERSION),python2.7)
54+
REQUIREMENTS := test-requirements-py27.txt requirements.txt
55+
else
56+
REQUIREMENTS := test-requirements.txt requirements.txt
57+
endif
58+
5459
# Pin common pip version here across all the targets
5560
# Note! Periodic maintenance pip upgrades are required to be up-to-date with the latest pip security fixes and updates
5661
PIP_VERSION ?= 20.0.2
@@ -543,10 +548,9 @@ requirements: virtualenv .requirements .sdist-requirements install-runners insta
543548
fi
544549

545550
# Install requirements
546-
#
547551
for req in $(REQUIREMENTS); do \
548-
echo "Installing $$req..." ; \
549-
$(VIRTUALENV_DIR)/bin/pip install $(PIP_OPTIONS) -r $$req ; \
552+
echo "Installing $$req..." ; \
553+
$(VIRTUALENV_DIR)/bin/pip install $(PIP_OPTIONS) -r $$req ; \
550554
done
551555

552556
# Install st2common package to load drivers defined in st2common setup.py

test-requirements-py27.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# NOTE: codecov only supports coverage==4.5.2
2+
coverage==4.5.2
3+
pep8==1.7.1
4+
st2flake8==0.1.0
5+
astroid==1.6.5
6+
pylint==1.9.4
7+
pylint-plugin-utils>=0.4
8+
bandit==1.5.1
9+
ipython<6.0.0
10+
mock==3.0.5
11+
nose>=1.3.7
12+
tabulate
13+
unittest2
14+
sphinx==1.7.9
15+
sphinx-autobuild
16+
# nosetests enhancements
17+
rednose
18+
nose-timer==0.7.5
19+
# splitting tests run on a separate CI machines
20+
nose-parallel==0.3.1
21+
# Required by st2client tests
22+
pyyaml==5.1.2
23+
RandomWords
24+
gunicorn==19.9.0
25+
psutil==5.6.6
26+
webtest==2.0.25
27+
rstcheck>=3.3.1,<3.4
28+
tox==3.14.1
29+
pyrabbit
30+
# Since StackStorm v2.8.0 we now use cryptography instead of keyczar, but we still have some tests
31+
# which utilize keyczar and ensure new cryptography code is fully compatible with keyczar code
32+
# (those tests only run under Python 2.7 since keyczar doesn't support Python 3.x).
33+
# See https://github.com/StackStorm/st2/pull/4165
34+
python-keyczar
35+
pip-tools # For pip-compile, to check for version conflicts

0 commit comments

Comments
 (0)