* Add numpy to install requires

This commit is contained in:
Matthew Honnibal 2015-01-25 14:49:10 +11:00
parent 951d06c824
commit 7588adf5e7
1 changed files with 14 additions and 6 deletions

View File

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