@@ -123,6 +123,7 @@ def configuration(parent_package='', top_path=None):
123
123
os .remove ('MANIFEST' )
124
124
125
125
from numpy .distutils .misc_util import Configuration
126
+
126
127
config = Configuration (None , parent_package , top_path )
127
128
128
129
# Avoid non-useful msg:
@@ -137,26 +138,6 @@ def configuration(parent_package='', top_path=None):
137
138
return config
138
139
139
140
140
- def get_scipy_status ():
141
- """
142
- Returns a dictionary containing a boolean specifying whether SciPy
143
- is up-to-date, along with the version string (empty string if
144
- not installed).
145
- """
146
- scipy_status = {}
147
- try :
148
- import scipy
149
- scipy_version = scipy .__version__
150
- scipy_status ['up_to_date' ] = parse_version (
151
- scipy_version ) >= parse_version (SCIPY_MIN_VERSION )
152
- scipy_status ['version' ] = scipy_version
153
- except ImportError :
154
- traceback .print_exc ()
155
- scipy_status ['up_to_date' ] = False
156
- scipy_status ['version' ] = ""
157
- return scipy_status
158
-
159
-
160
141
def get_numpy_status ():
161
142
"""
162
143
Returns a dictionary containing a boolean specifying whether NumPy
@@ -206,6 +187,10 @@ def setup_package():
206
187
'Programming Language :: Python :: 3.6' ,
207
188
],
208
189
cmdclass = cmdclass ,
190
+ install_requires = [
191
+ 'numpy>={0}' .format (NUMPY_MIN_VERSION ),
192
+ 'scipy>={0}' .format (SCIPY_MIN_VERSION )
193
+ ],
209
194
** extra_setuptools_args )
210
195
211
196
if len (sys .argv ) == 1 or (
@@ -229,9 +214,6 @@ def setup_package():
229
214
numpy_status = get_numpy_status ()
230
215
numpy_req_str = "scikit-learn requires NumPy >= {0}.\n " .format (
231
216
NUMPY_MIN_VERSION )
232
- scipy_status = get_scipy_status ()
233
- scipy_req_str = "scikit-learn requires SciPy >= {0}.\n " .format (
234
- SCIPY_MIN_VERSION )
235
217
236
218
instructions = ("Installation instructions are available on the "
237
219
"scikit-learn website: "
@@ -247,16 +229,6 @@ def setup_package():
247
229
raise ImportError ("Numerical Python (NumPy) is not "
248
230
"installed.\n {0}{1}"
249
231
.format (numpy_req_str , instructions ))
250
- if scipy_status ['up_to_date' ] is False :
251
- if scipy_status ['version' ]:
252
- raise ImportError ("Your installation of Scientific Python "
253
- "(SciPy) {0} is out-of-date.\n {1}{2}"
254
- .format (scipy_status ['version' ],
255
- scipy_req_str , instructions ))
6815
256
- else :
257
- raise ImportError ("Scientific Python (SciPy) is not "
258
- "installed.\n {0}{1}"
259
- .format (scipy_req_str , instructions ))
260
232
261
233
from numpy .distutils .core import setup
262
234
0 commit comments