File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -711,11 +711,19 @@ class Numpy(SetupPackage):
711711
712712 @staticmethod
713713 def include_dirs_hook ():
714- import __builtin__
715- if hasattr (__builtin__ , '__NUMPY_SETUP__' ):
716- del __builtin__ .__NUMPY_SETUP__
717- import numpy
718- reload (numpy )
714+ if sys .version_info [0 ] >= 3 :
715+ import builtins
716+ if hasattr (builtins , '__NUMPY_SETUP__' ):
717+ del builtins .__NUMPY_SETUP__
718+ import imp
719+ import numpy
720+ imp .reload (numpy )
721+ else :
722+ import __builtin__
723+ if hasattr (__builtin__ , '__NUMPY_SETUP__' ):
724+ del __builtin__ .__NUMPY_SETUP__
725+ import numpy
726+ reload (numpy )
719727
720728 ext = Extension ('test' , [])
721729 ext .include_dirs .append (numpy .get_include ())
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ python.tmp/bin/python setup.py install
1313python.tmp/bin/python -c " import matplotlib"
1414rm -rf python.tmp
1515
16- # Tests that pip works
17-
16+ set -e
17+ cd ..
1818rm -rf build
1919rm -rf numpy*
2020rm -rf python.tmp
21- python unit/virtualenv.py python.tmp
22- python.tmp/bin/pip install .
23- python.tmp/bin/python -c " import matplotlib"
21+ python3 unit/virtualenv.py python.tmp
22+ python.tmp/bin/python3 setup.py install
23+ python.tmp/bin/python3 -c " import matplotlib"
2424rm -rf python.tmp
You can’t perform that action at this time.
0 commit comments