summaryrefslogtreecommitdiff
path: root/src/cython/setup.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/cython/setup.py.in')
-rw-r--r--src/cython/setup.py.in39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/cython/setup.py.in b/src/cython/setup.py.in
index 3c37664f..fd4307e3 100644
--- a/src/cython/setup.py.in
+++ b/src/cython/setup.py.in
@@ -12,21 +12,33 @@ from numpy import get_include as numpy_get_include
- YYYY/MM Author: Description of the modification
"""
-__author__ = "GUDHI Editorial Board"
+__author__ = "Vincent Rouvreau"
__copyright__ = "Copyright (C) 2016 Inria"
__license__ = "MIT"
-simplex_tree = Extension(
- "gudhi.simplex_tree",
- sources = ['@CMAKE_CURRENT_SOURCE_DIR@/gudhi/simplex_tree.pyx',],
- language = 'c++',
- extra_compile_args=[@GUDHI_CYTHON_EXTRA_COMPILE_ARGS@],
- extra_link_args=[@GUDHI_CYTHON_EXTRA_LINK_ARGS@],
- libraries=[@GUDHI_CYTHON_LIBRARIES@],
- library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@],
- include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', @GUDHI_CYTHON_INCLUDE_DIRS@],
- runtime_library_dirs=[@GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS@],
-)
+modules = [@GUDHI_CYTHON_MODULES_TO_COMPILE@]
+
+source_dir='@CMAKE_CURRENT_SOURCE_DIR@/gudhi/'
+extra_compile_args=[@GUDHI_CYTHON_EXTRA_COMPILE_ARGS@]
+extra_link_args=[@GUDHI_CYTHON_EXTRA_LINK_ARGS@]
+libraries=[@GUDHI_CYTHON_LIBRARIES@]
+library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@]
+include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', @GUDHI_CYTHON_INCLUDE_DIRS@]
+runtime_library_dirs=[@GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS@]
+
+# Create ext_modules list from module list
+ext_modules = []
+for module in modules:
+ ext_modules.append(Extension(
+ 'gudhi.' + module,
+ sources = [source_dir + module + '.pyx',],
+ language = 'c++',
+ extra_compile_args=extra_compile_args,
+ extra_link_args=extra_link_args,
+ libraries=libraries,
+ library_dirs=library_dirs,
+ include_dirs=include_dirs,
+ runtime_library_dirs=runtime_library_dirs,))
setup(
name = 'gudhi',
@@ -35,8 +47,7 @@ setup(
author_email='gudhi-contact@lists.gforge.inria.fr',
version='@GUDHI_VERSION@',
url='http://gudhi.gforge.inria.fr/',
- ext_modules = cythonize(simplex_tree),
-# cmdclass={'build_ext': Cython.Build.build_ext},
+ ext_modules = cythonize(ext_modules),
install_requires = ['cython','numpy >= 1.9',],
setup_requires = ['numpy >= 1.9',],
)