forked from helpsystems/pcapy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
88 lines (73 loc) · 1.74 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[tox]
envlist = build, style, doc, test
[testenv]
basepython = python3
changedir = {envtmpdir}
passenv = HOME WORKSPACE https_proxy http_proxy no_proxy
[testenv:build]
skip_install = True
deps =
wheel
whitelist_externals =
rm
commands =
rm -rf {toxinidir}/build {toxinidir}/dist
{envpython} {toxinidir}/setup.py bdist_wheel
[testenv:style]
skip_install = True
deps =
flake8
pep8-naming
whitelist_externals =
sh
commands =
flake8 {toxinidir}
sh -c "\
uncrustify -c {toxinidir}/uncrustify.cfg --check \
{toxinidir}/lib/pcapyplus/*.cpp \
{toxinidir}/lib/pcapyplus/include/*.hpp \
"
[testenv:doc]
deps =
-rdoc/requirements.txt
whitelist_externals =
dot
commands =
sphinx-build -W -b html -d doctrees {toxinidir}/doc/ html
{envpython} -c "print('>> You may now run:\nwebdev {envtmpdir}/html/')"
[testenv:test]
deps =
-rtest/requirements.txt
whitelist_externals =
rm
commands =
# Clean testing cache
rm -rf {toxinidir}/test/__pycache__
# Run test suite
py.test -s \
--junitxml=tests.xml \
--cov=pcapyplus \
--cov-report xml \
--cov-report html \
--cov-report term \
{posargs} \
{toxinidir}/test
[testenv:publish]
skip_install = True
deps =
wheel
twine
whitelist_externals =
ls
commands =
{envpython} {toxinidir}/setup.py sdist
{envpython} {toxinidir}/setup.py bdist_wheel
ls -lh {toxinidir}/dist/
twine check {toxinidir}/dist/*
{envpython} -c "print((\
'Packages ready. '\
'Execute the following command to publish:\n'\
' twine upload --skip-existing dist/*'\
))"
[flake8]
exclude = .git,.tox,.cache,__pycache__,build,*.egg-info,.local,OLD