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

Skip to content

Commit 19873d1

Browse files
committed
Backporting numpy version check fix to 0.99 branch
svn path=/branches/v0_99_maint/; revision=8146
1 parent 90bf7a7 commit 19873d1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

doc/make.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ def latex():
6565
print 'latex build has not been tested on windows'
6666

6767
def clean():
68-
shutil.rmtree("build")
69-
shutil.rmtree("examples")
68+
for dirpath in ['build', 'examples']:
69+
if os.path.exists(dirpath):
70+
shutil.rmtree(dirpath)
7071
for pattern in ['mpl_examples/api/*.png',
7172
'mpl_examples/pylab_examples/*.png',
7273
'mpl_examples/pylab_examples/*.pdf',

setupext.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,10 @@ def check_for_numpy():
499499
return False
500500
nn = numpy.__version__.split('.')
501501
if not (int(nn[0]) >= 1 and int(nn[1]) >= 1):
502-
print_message(
503-
'numpy 1.1 or later is required; you have %s' % numpy.__version__)
504-
return False
502+
if not int(nn[0]) >= 1:
503+
print_message(
504+
'numpy 1.1 or later is required; you have %s' % numpy.__version__)
505+
return False
505506
module = Extension('test', [])
506507
add_numpy_flags(module)
507508
add_base_flags(module)

0 commit comments

Comments
 (0)