Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d450ca9

Browse files
committed
BUG: can't build with numpy development versions
distutils.version has two Version classes, and neither one does what we need for numpy version checking. Simply splitting on the decimal point is adequate so long as the first three components are single digits. This is likely to remain the case for a long time.
1 parent 2410547 commit d450ca9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setupext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import os
4747
import re
4848
import subprocess
49-
from distutils import sysconfig, version
49+
from distutils import sysconfig
5050

5151
basedir = {
5252
'win32' : ['win32_static',],
@@ -550,8 +550,8 @@ def check_for_numpy(min_version):
550550
min_version)
551551
return False
552552

553-
expected_version = version.StrictVersion(min_version)
554-
found_version = version.StrictVersion(numpy.__version__)
553+
expected_version = min_version.split('.')
554+
found_version = numpy.__version__.split('.')
555555
if not found_version >= expected_version:
556556
print_message(
557557
'numpy %s or later is required; you have %s' %

0 commit comments

Comments
 (0)