* Fix the way numpy headers are installed during compilation from source

This commit is contained in:
Matthew Honnibal 2015-01-30 18:14:45 +11:00
parent 1ef0e04aa0
commit f0bbffca8d

View File

@ -17,7 +17,7 @@ import platform
# PyPy --- NB! PyPy doesn't really work, it segfaults all over the place. But,
# this is necessary to get it compile.
# We have to resort to monkey-patching to set the compiler, because pypy broke
# ALL the EVERTHING.
# all the everything.
pre_patch_customize_compiler = sysconfig.customize_compiler
def my_customize_compiler(compiler):
@ -42,7 +42,8 @@ includes = ['.', path.join(sys.prefix, 'include')]
try:
import numpy
includes.append(numpy.get_include())
numpy_headers = path.join(numpy.get_include(), 'numpy')
shutil.copytree(numpy_headers, path.join(sys.prefix, 'include', 'numpy'))
except ImportError:
pass