Skip to content

Commit 74c34e0

Browse files
committed
MNT: Constrain numpy < 1.17 if Python < 3
1 parent 79ee1b3 commit 74c34e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nipype/info.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def get_nipype_gitversion():
107107
# https://www.opensourceanswers.com/blog/you-shouldnt-use-python-37-for-data-science-right-now.html
108108
NUMPY_MIN_VERSION_37 = '1.15.3'
109109
NUMPY_BAD_VERSION_27 = '1.16.0'
110+
# Numpy drops 2.7 support in 1.17
111+
NUMPY_MAX_VERSION_27 = '1.17.0'
110112
SCIPY_MIN_VERSION = '0.14'
111113
TRAITS_MIN_VERSION = '4.6'
112114
DATEUTIL_MIN_VERSION = '2.2'
@@ -146,7 +148,9 @@ def get_nipype_gitversion():
146148
'nibabel>=%s' % NIBABEL_MIN_VERSION,
147149
'numpy>=%s ; python_version > "3.0" and python_version < "3.7"' % NUMPY_MIN_VERSION,
148150
'numpy>=%s ; python_version >= "3.7"' % NUMPY_MIN_VERSION_37,
149-
'numpy>=%s,!=%s ; python_version == "2.7"' % (NUMPY_MIN_VERSION, NUMPY_BAD_VERSION_27),
151+
'numpy>=%s,!=%s,<%s ; python_version == "2.7"' % (NUMPY_MIN_VERSION,
152+
NUMPY_BAD_VERSION_27,
153+
NUMPY_MAX_VERSION_27),
150154
'packaging',
151155
'pathlib2; python_version <= "3.4"',
152156
'prov>=%s' % PROV_VERSION,

0 commit comments

Comments
 (0)