mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-25 03:13:41 +03:00
* Add numpy to install requires
This commit is contained in:
parent
951d06c824
commit
7588adf5e7
20
setup.py
20
setup.py
|
@ -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"],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user