Skip to content

Commit 49236d9

Browse files
authored
Merge pull request #511 from python-cmd2/redundant_dependencies
Reduce redundant definition of dependencies
2 parents 4904e4a + 5579f78 commit 49236d9

File tree

2 files changed

+13
-84
lines changed

2 files changed

+13
-84
lines changed

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@
7070
":sys_platform!='win32'": ['wcwidth'],
7171
# Python 3.4 and earlier require contextlib2 for temporarily redirecting stderr and stdout
7272
":python_version<'3.5'": ['contextlib2', 'typing'],
73-
# development only dependencies
74-
# install with 'pip install -e .[dev]'
75-
'dev': [
76-
# for python 3.5 and earlier we need the third party mock module
77-
"mock ; python_version<'3.6'",
78-
'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'tox', 'pylint',
79-
'sphinx', 'sphinx-rtd-theme', 'sphinx-autobuild', 'invoke', 'twine>=1.11',
73+
# Extra dependencies for running unit tests
74+
'test': ["argcomplete ; sys_platform!='win32'", # include argcomplete tests where available
75+
"mock ; python_version<'3.6'", # for python 3.5 and earlier we need the third party mock module
76+
'codecov', 'pytest', 'pytest-cov', 'pytest-mock'],
77+
# development only dependencies: install with 'pip install -e .[dev]'
78+
'dev': ["mock ; python_version<'3.6'", # for python 3.5 and earlier we need the third party mock module
79+
'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'tox', 'pylint',
80+
'sphinx', 'sphinx-rtd-theme', 'sphinx-autobuild', 'invoke', 'twine>=1.11',
8081
]
8182
}
8283

tox.ini

Lines changed: 5 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ testpaths = tests
66

77
[testenv]
88
passenv = CI TRAVIS TRAVIS_* APPVEYOR*
9-
setenv =
10-
PYTHONPATH={toxinidir}
9+
setenv = PYTHONPATH={toxinidir}
10+
extras = test
11+
commands =
12+
py.test {posargs} --cov
13+
codecov
1114

1215
[testenv:docs]
1316
basepython = python3.5
@@ -16,78 +19,3 @@ deps =
1619
sphinx-rtd-theme
1720
changedir = docs
1821
commands = sphinx-build -a -W -T -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
19-
20-
[testenv:py34]
21-
deps =
22-
codecov
23-
pyperclip
24-
pytest
25-
pytest-cov
26-
pytest-mock
27-
argcomplete
28-
wcwidth
29-
commands =
30-
py.test {posargs} --cov
31-
codecov
32-
33-
[testenv:py35]
34-
deps =
35-
mock
36-
pyperclip
37-
pytest
38-
pytest-mock
39-
argcomplete
40-
wcwidth
41-
commands = py.test -v
42-
43-
[testenv:py35-win]
44-
deps =
45-
mock
46-
pyperclip
47-
pyreadline
48-
pytest
49-
commands = py.test -v
50-
51-
[testenv:py36]
52-
deps =
53-
codecov
54-
pyperclip
55-
pytest
56-
pytest-cov
57-
pytest-mock
58-
argcomplete
59-
wcwidth
60-
commands =
61-
py.test {posargs} --cov
62-
codecov
63-
64-
[testenv:py36-win]
65-
deps =
66-
codecov
67-
pyperclip
68-
pyreadline
69-
pytest
70-
pytest-cov
71-
commands =
72-
py.test {posargs} --cov
73-
codecov
74-
75-
[testenv:py37]
76-
deps =
77-
pyperclip
78-
pytest
79-
pytest-mock
80-
argcomplete
81-
wcwidth
82-
commands = py.test -v
83-
84-
[testenv:py37-win]
85-
deps =
86-
codecov
87-
pyperclip
88-
pyreadline
89-
pytest
90-
pytest-cov
91-
commands =
92-
py.test {posargs} --cov
93-
codecov

0 commit comments

Comments
 (0)