* Add murmurhash to setup while we figure out cython includes

This commit is contained in:
Matthew Honnibal 2014-08-15 23:56:57 +02:00
parent f11c8e22eb
commit 7fd9b2f1f8

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
import Cython.Distutils import Cython.Distutils
from distutils.extension import Extension from Cython.Distutils import Extension
import distutils.core import distutils.core
import sys import sys
@ -33,25 +33,39 @@ compile_args = []
link_args = [] link_args = []
libs = [] libs = []
includes = [] includes = ['.', 'murmurhash/']
cython_includes = ['.']
if 'VIRTUAL_ENV' in os.environ: if 'VIRTUAL_ENV' in os.environ:
includes += glob(path.join(os.environ['VIRTUAL_ENV'], 'include', 'site', '*')) includes += glob(path.join(os.environ['VIRTUAL_ENV'], 'include', 'site', '*'))
cython_includes += glob(path.join(os.environ['VIRTUAL_ENV'], 'lib', '*'))
else: else:
# If you're not using virtualenv, set your include dir here. # If you're not using virtualenv, set your include dir here.
pass pass
print includes
print cython_includes
exts = [ exts = [
Extension("spacy.en", ["spacy/en.pyx"], language="c++", include_dirs=includes), Extension("spacy.en", ["spacy/en.pyx"], language="c++",
Extension("spacy.en_ptb", ["spacy/en_ptb.pyx"], language="c++", include_dirs=includes), include_dirs=includes, cython_include_dirs=cython_includes),
Extension("spacy.lexeme", ["spacy/lexeme.pyx"], language="c++", include_dirs=includes), Extension("spacy.en_ptb", ["spacy/en_ptb.pyx"], language="c++", include_dirs=includes,
Extension("spacy.spacy", ["spacy/spacy.pyx"], language="c++", include_dirs=includes), cython_include_dirs=cython_includes),
Extension("spacy._hashing", ["spacy/_hashing.pyx"], language="c++", include_dirs=includes), Extension("spacy.lexeme", ["spacy/lexeme.pyx"], language="c++", include_dirs=includes,
Extension("spacy.tokens", ["spacy/tokens.pyx"], language="c++", include_dirs=includes), cython_include_dirs=cython_includes),
Extension("spacy.spacy", ["spacy/spacy.pyx"], language="c++", include_dirs=includes,
cython_include_dirs=cython_includes),
Extension("spacy._hashing", ["spacy/_hashing.pyx"], language="c++", include_dirs=includes,
cython_include_dirs=cython_includes),
Extension("spacy.chartree", ["spacy/chartree.pyx"], language="c++", include_dirs=includes,
cython_include_dirs=cython_includes),
Extension("spacy.tokens", ["spacy/tokens.pyx"], language="c++", include_dirs=includes,
cython_include_dirs=cython_includes),
Extension("spacy.string_tools", ["spacy/string_tools.pyx"], language="c++", Extension("spacy.string_tools", ["spacy/string_tools.pyx"], language="c++",
include_dirs=includes), include_dirs=includes, cython_include_dirs=cython_includes),
Extension("murmurhash.mrmr", ["murmurhash/mrmr.pyx", 'murmurhash/MurmurHash2.cpp', 'murmurhash/MurmurHash3.cpp'], language="c++",
include_dirs=includes, cython_include_dirs=cython_includes)
] ]