mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Load numpy headers
This commit is contained in:
parent
7d9306c3bd
commit
e579dd39ca
16
setup.py
16
setup.py
|
@ -13,6 +13,11 @@ from setuptools import Extension
|
|||
from distutils import sysconfig
|
||||
import platform
|
||||
|
||||
|
||||
print sys.argv
|
||||
|
||||
# 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.
|
||||
|
||||
|
@ -26,6 +31,16 @@ if platform.python_implementation() == 'PyPy':
|
|||
sysconfig.customize_compiler = my_customize_compiler
|
||||
|
||||
|
||||
def install_headers():
|
||||
dest_dir = path.join(sys.prefix, 'include', 'murmurhash')
|
||||
if not path.exists(dest_dir):
|
||||
shutil.copytree('murmurhash/headers/murmurhash', dest_dir)
|
||||
|
||||
|
||||
install_headers()
|
||||
includes = ['.', path.join(sys.prefix, 'include')]
|
||||
|
||||
|
||||
def clean(ext):
|
||||
for src in ext.sources:
|
||||
if src.endswith('.c') or src.endswith('cpp'):
|
||||
|
@ -83,6 +98,7 @@ def run_setup(exts):
|
|||
|
||||
headers_workaround.fix_venv_pypy_include()
|
||||
headers_workaround.install_headers('murmurhash')
|
||||
headers_workaround.install_headers('numpy')
|
||||
|
||||
|
||||
def main(modules, is_pypy):
|
||||
|
|
Loading…
Reference in New Issue
Block a user