summaryrefslogtreecommitdiff
path: root/src/python/setup.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/setup.py.in')
-rw-r--r--src/python/setup.py.in31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/python/setup.py.in b/src/python/setup.py.in
index 3f1d4424..f968bd59 100644
--- a/src/python/setup.py.in
+++ b/src/python/setup.py.in
@@ -1,7 +1,3 @@
-from setuptools import setup, Extension
-from Cython.Build import cythonize
-from numpy import get_include as numpy_get_include
-
"""This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
Author(s): Vincent Rouvreau
@@ -12,6 +8,12 @@ from numpy import get_include as numpy_get_include
- YYYY/MM Author: Description of the modification
"""
+from setuptools import setup, Extension, find_packages
+from Cython.Build import cythonize
+from numpy import get_include as numpy_get_include
+import sys
+import pybind11
+
__author__ = "Vincent Rouvreau"
__copyright__ = "Copyright (C) 2016 Inria"
__license__ = "MIT"
@@ -38,16 +40,29 @@ for module in modules:
libraries=libraries,
library_dirs=library_dirs,
include_dirs=include_dirs,
- runtime_library_dirs=runtime_library_dirs,))
+ runtime_library_dirs=runtime_library_dirs,
+ cython_directives = {'language_level': str(sys.version_info[0])},))
+
+ext_modules = cythonize(ext_modules)
+
+ext_modules.append(Extension(
+ 'gudhi.hera',
+ sources = [source_dir + 'hera.cc'],
+ language = 'c++',
+ include_dirs = include_dirs +
+ ['@HERA_WASSERSTEIN_INCLUDE_DIR@',
+ pybind11.get_include(False), pybind11.get_include(True)],
+ extra_compile_args=extra_compile_args + [@GUDHI_PYBIND11_EXTRA_COMPILE_ARGS@],
+ ))
setup(
name = 'gudhi',
- packages=["gudhi",],
+ packages=find_packages(), # find_namespace_packages(include=["gudhi*"])
author='GUDHI Editorial Board',
author_email='gudhi-contact@lists.gforge.inria.fr',
version='@GUDHI_VERSION@',
url='http://gudhi.gforge.inria.fr/',
- ext_modules = cythonize(ext_modules),
+ ext_modules = ext_modules,
install_requires = ['cython','numpy >= 1.9',],
- setup_requires = ['numpy >= 1.9',],
+ setup_requires = ['numpy >= 1.9','pybind11',],
)