mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
try using system-wide headers
This commit is contained in:
parent
b2f66f7b8d
commit
73674a4afb
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
if [ ! -d ".cythonize" ]; then
|
||||
virtualenv .cythonize
|
||||
fi
|
||||
. .cythonize/bin/activate
|
||||
pip install -U -r requirements.txt
|
||||
./bin/cythonize.py $@
|
7
build.sh
Executable file
7
build.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
if [ ! -d ".build" ]; then
|
||||
virtualenv --always-copy .build
|
||||
fi
|
||||
. .build/bin/activate
|
||||
pip install -U -r requirements.txt
|
||||
tox $@
|
23
setup.py
23
setup.py
|
@ -172,7 +172,8 @@ if not release:
|
|||
def generate_cython():
|
||||
cwd = os.path.abspath(os.path.dirname(__file__))
|
||||
print('Cythonizing sources')
|
||||
p = subprocess.call([os.path.join(cwd, 'bin', 'cythonize.sh'),
|
||||
p = subprocess.call([sys.executable,
|
||||
os.path.join(cwd, 'bin', 'cythonize.py'),
|
||||
'spacy'],
|
||||
cwd=cwd)
|
||||
if p != 0:
|
||||
|
@ -197,8 +198,8 @@ def setup_package():
|
|||
write_version_py()
|
||||
|
||||
include_dirs = [
|
||||
os.path.join(sys.prefix, 'include'),
|
||||
get_python_inc(plat_specific=True)]
|
||||
get_python_inc(plat_specific=True),
|
||||
os.path.join(src_path, 'include')]
|
||||
|
||||
ext_modules = []
|
||||
for mod_name in MOD_NAMES:
|
||||
|
@ -236,15 +237,15 @@ def setup_package():
|
|||
shutil.rmtree(include_dir)
|
||||
os.mkdir(include_dir)
|
||||
|
||||
# import numpy
|
||||
# shutil.copytree(
|
||||
# os.path.join(numpy.get_include(), 'numpy'),
|
||||
# os.path.join(include_dir, 'numpy'))
|
||||
import numpy
|
||||
shutil.copytree(
|
||||
os.path.join(numpy.get_include(), 'numpy'),
|
||||
os.path.join(include_dir, 'numpy'))
|
||||
|
||||
# import murmurhash
|
||||
# shutil.copytree(
|
||||
# os.path.join(os.path.dirname(murmurhash.__file__), 'headers', 'murmurhash'),
|
||||
# os.path.join(include_dir, 'murmurhash'))
|
||||
import murmurhash
|
||||
shutil.copytree(
|
||||
os.path.join(os.path.dirname(murmurhash.__file__), 'headers', 'murmurhash'),
|
||||
os.path.join(include_dir, 'murmurhash'))
|
||||
|
||||
try:
|
||||
setup(**metadata)
|
||||
|
|
Loading…
Reference in New Issue
Block a user