mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 21:50:35 +03:00
Set include_dirs in Extension
Set the `include_dirs` in each `Extension` rather than in `setup()` to handle the case where there is a custom `distutils.cfg` that modifies the include paths, in particular for python from homebrew.
This commit is contained in:
parent
592678fb7d
commit
3abfa994d1
3
setup.py
3
setup.py
|
@ -204,7 +204,7 @@ def setup_package():
|
||||||
for name in MOD_NAMES:
|
for name in MOD_NAMES:
|
||||||
mod_path = name.replace(".", "/") + ".pyx"
|
mod_path = name.replace(".", "/") + ".pyx"
|
||||||
ext = Extension(
|
ext = Extension(
|
||||||
name, [mod_path], language="c++", extra_compile_args=["-std=c++11"]
|
name, [mod_path], language="c++", include_dirs=include_dirs, extra_compile_args=["-std=c++11"]
|
||||||
)
|
)
|
||||||
ext_modules.append(ext)
|
ext_modules.append(ext)
|
||||||
print("Cythonizing sources")
|
print("Cythonizing sources")
|
||||||
|
@ -216,7 +216,6 @@ def setup_package():
|
||||||
version=about["__version__"],
|
version=about["__version__"],
|
||||||
ext_modules=ext_modules,
|
ext_modules=ext_modules,
|
||||||
cmdclass={"build_ext": build_ext_subclass},
|
cmdclass={"build_ext": build_ext_subclass},
|
||||||
include_dirs=include_dirs,
|
|
||||||
package_data={"": ["*.pyx", "*.pxd", "*.pxi"]},
|
package_data={"": ["*.pyx", "*.pxd", "*.pxi"]},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user