* Add numpy to install requires

This commit is contained in:
Matthew Honnibal 2015-01-25 14:49:10 +11:00
parent 951d06c824
commit 7588adf5e7

View File

@ -29,16 +29,24 @@ if platform.python_implementation() == 'PyPy':
sysconfig.customize_compiler = my_customize_compiler sysconfig.customize_compiler = my_customize_compiler
def install_headers(): #def install_headers():
dest_dir = path.join(sys.prefix, 'include', 'murmurhash') # dest_dir = path.join(sys.prefix, 'include', 'murmurhash')
if not path.exists(dest_dir): # if not path.exists(dest_dir):
shutil.copytree('murmurhash/headers/murmurhash', dest_dir) # shutil.copytree('murmurhash/headers/murmurhash', dest_dir)
#
# dest_dir = path.join(sys.prefix, 'include', 'numpy')
install_headers()
includes = ['.', path.join(sys.prefix, 'include')] includes = ['.', path.join(sys.prefix, 'include')]
try:
import numpy
includes.append(numpy.get_include())
except ImportError:
pass
def clean(ext): def clean(ext):
for src in ext.sources: for src in ext.sources:
if src.endswith('.c') or src.endswith('cpp'): if src.endswith('.c') or src.endswith('cpp'):
@ -87,7 +95,7 @@ def run_setup(exts):
"spacy.syntax": ["*.pxd"]}, "spacy.syntax": ["*.pxd"]},
ext_modules=exts, ext_modules=exts,
license="Dual: Commercial or AGPL", license="Dual: Commercial or AGPL",
install_requires=['murmurhash', 'cymem', 'preshed', 'thinc', install_requires=['numpy', 'murmurhash', 'cymem', 'preshed', 'thinc',
"unidecode", ], "unidecode", ],
setup_requires=["headers_workaround"], setup_requires=["headers_workaround"],
) )