Skip to content

Commit b440196

Browse files
committed
fix(build): reuse dependencies definitions
1 parent af7ae0f commit b440196

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

setup.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919
with io.open('graphkit/__init__.py', 'rt', encoding='utf8') as f:
2020
version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)
2121

22+
plot_reqs = [
23+
"ipython; python_version >= '3.5'", # to test jupyter plot.
24+
"matplotlib", # to test plot
25+
"pydot", # to test plot
26+
]
27+
test_reqs = plot_reqs + [
28+
"pytest",
29+
"pytest-cov",
30+
]
31+
2232
setup(
2333
name='graphkit',
2434
version=version,
@@ -33,16 +43,10 @@
3343
"networkx == 2.2; python_version < '3.5'",
3444
],
3545
extras_require={
36-
'plot': ['pydot', 'matplotlib'],
37-
'test': ['pydot', 'matplotlib', 'pytest', "pytest-cov"],
46+
'plot': plot_reqs,
47+
'test': test_reqs,
3848
},
39-
tests_require=[
40-
"pytest",
41-
"pytest-cov",
42-
"ipython; python_version >= '3.5'", # to test jupyter plot.
43-
"pydot", # to test plot
44-
"matplotlib" # to test plot
45-
],
49+
tests_require=test_reqs,
4650
license='Apache-2.0',
4751
keywords=['graph', 'computation graph', 'DAG', 'directed acyclical graph'],
4852
classifiers=[

0 commit comments

Comments
 (0)