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

Skip to content

Commit 373c4d7

Browse files
committed
Fix installing numpy as a setup-time dependency
1 parent b512e49 commit 373c4d7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258

259259
# List third-party Python packages that we require
260260
install_requires=install_requires,
261+
setup_requires=setup_requires,
261262

262263
# matplotlib has C/C++ extensions, so it's not zip safe.
263264
# Telling setuptools this prevents it from doing an automatic

setupext.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,11 @@ 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__
714717
import numpy
718+
reload(numpy)
715719

716720
ext = Extension('test', [])
717721
ext.include_dirs.append(numpy.get_include())

0 commit comments

Comments
 (0)