-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtox.ini
51 lines (48 loc) · 1.91 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[tox]
envlist = py27-sdist,py36-sdist,py27,py36
skipsdist = true
[testenv]
whitelist_externals = rm
mkdir
cp
make
bash
/bin/bash
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-development.txt
#changedir = /tmp/{envname}-checks
commands = rm -rf /tmp/{envname}-checks
mkdir /tmp/{envname}-checks
bash -c 'cp -r {toxinidir}/* /tmp/{envname}-checks'
make -C /tmp/{envname}-checks compile
flake8 --config ./lint-configs/python/.flake8 st2sdk/
# NOTE: We use custom commands for sdist checks because Circle CI doesn't allow
# us to write directly to the directory where the code is checked out to (python
# setup.py sdist writes <package>.egg-info directory in a working dir where it's ran from)
[testenv:py27-sdist]
# NOTE: We explicitly specify empts deps to ensure no other dependencies are
# installed in that virtualenv and verify installation works on a fresh system
# without any dependencies
deps =
basepython = python2.7
changedir = /tmp
commands = rm -rf /tmp/py2-sdist
cp -r {toxinidir} /tmp/py2-sdist
python /tmp/py2-sdist/setup.py sdist --formats=zip
python /tmp/py2-sdist/setup.py install
rm -rf /tmp/py2-sdist
rm -rf {toxinidir}/__pycache__
rm -rf {toxinidir}/st2sdk/__pycache__
[testenv:py36-sdist]
# NOTE: We explicitly specify empts deps to ensure no other dependencies are
# installed in that virtualenv and verify installation works on a fresh system
# without any dependencies
deps =
basepython = python3.6
changedir = /tmp
commands = rm -rf /tmp/py3-sdist
cp -r {toxinidir} /tmp/py3-sdist
python /tmp/py3-sdist/setup.py sdist --formats=zip
python /tmp/py3-sdist/setup.py install
rm -rf /tmp/py3-sdist
rm -rf {toxinidir}/__pycache__