mirror of https://github.com/explosion/spaCy.git
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 $@
|
|
|
@ -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():
|
def generate_cython():
|
||||||
cwd = os.path.abspath(os.path.dirname(__file__))
|
cwd = os.path.abspath(os.path.dirname(__file__))
|
||||||
print('Cythonizing sources')
|
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'],
|
'spacy'],
|
||||||
cwd=cwd)
|
cwd=cwd)
|
||||||
if p != 0:
|
if p != 0:
|
||||||
|
@ -197,8 +198,8 @@ def setup_package():
|
||||||
write_version_py()
|
write_version_py()
|
||||||
|
|
||||||
include_dirs = [
|
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 = []
|
ext_modules = []
|
||||||
for mod_name in MOD_NAMES:
|
for mod_name in MOD_NAMES:
|
||||||
|
@ -236,15 +237,15 @@ def setup_package():
|
||||||
shutil.rmtree(include_dir)
|
shutil.rmtree(include_dir)
|
||||||
os.mkdir(include_dir)
|
os.mkdir(include_dir)
|
||||||
|
|
||||||
# import numpy
|
import numpy
|
||||||
# shutil.copytree(
|
shutil.copytree(
|
||||||
# os.path.join(numpy.get_include(), 'numpy'),
|
os.path.join(numpy.get_include(), 'numpy'),
|
||||||
# os.path.join(include_dir, 'numpy'))
|
os.path.join(include_dir, 'numpy'))
|
||||||
|
|
||||||
# import murmurhash
|
import murmurhash
|
||||||
# shutil.copytree(
|
shutil.copytree(
|
||||||
# os.path.join(os.path.dirname(murmurhash.__file__), 'headers', 'murmurhash'),
|
os.path.join(os.path.dirname(murmurhash.__file__), 'headers', 'murmurhash'),
|
||||||
# os.path.join(include_dir, 'murmurhash'))
|
os.path.join(include_dir, 'murmurhash'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
setup(**metadata)
|
setup(**metadata)
|
||||||
|
|
Loading…
Reference in New Issue