Skip to content

Commit 9044554

Browse files
committed
MAINT: Require networkx<2.3 for Python 2
1 parent 32c4de5 commit 9044554

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: nipype/info.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def get_nipype_gitversion():
101101
# versions
102102
NIBABEL_MIN_VERSION = '2.1.0'
103103
NETWORKX_MIN_VERSION = '1.9'
104+
NETWORKX_MAX_VERSION_27 = '2.2'
104105
NUMPY_MIN_VERSION = '1.9.0'
105106
# Numpy bug in python 3.7:
106107
# https://www.opensourceanswers.com/blog/you-shouldnt-use-python-37-for-data-science-right-now.html
@@ -135,7 +136,8 @@ def get_nipype_gitversion():
135136
PROVIDES = ['nipype']
136137
REQUIRES = [
137138
'nibabel>=%s' % NIBABEL_MIN_VERSION,
138-
'networkx>=%s' % NETWORKX_MIN_VERSION,
139+
'networkx>=%s,<=%s ; python_version < "3.0"' % (NETWORKX_MIN_VERSION, NETWORKX_MAX_VERSION_27),
140+
'networkx>=%s ; python_version >= "3.0"' % NETWORKX_MIN_VERSION,
139141
'numpy>=%s,!=%s ; python_version == "2.7"' % (NUMPY_MIN_VERSION, NUMPY_BAD_VERSION_27),
140142
'numpy>=%s ; python_version > "3.0" and python_version < "3.7"' % NUMPY_MIN_VERSION,
141143
'numpy>=%s ; python_version >= "3.7"' % NUMPY_MIN_VERSION_37,

0 commit comments

Comments
 (0)