summaryrefslogtreecommitdiff
path: root/src/cython/gudhi/__init__.py.in
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2019-08-29 10:04:35 +0200
committerGitHub <noreply@github.com>2019-08-29 10:04:35 +0200
commitc97c861c423ff3f33db10e87a2a790d9717b80cd (patch)
treeafcdc6d54a3335fbef814415a7a8219fc16b1357 /src/cython/gudhi/__init__.py.in
parentfb082d6ae9865d148b3d851e50cdaeab00a97c81 (diff)
parent51a38f313f633e1c593d77319f3752a010da782c (diff)
Merge pull request #83 from VincentRouvreau/split_gudhi_python_in_modules
Split gudhi python in modules
Diffstat (limited to 'src/cython/gudhi/__init__.py.in')
-rw-r--r--src/cython/gudhi/__init__.py.in40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/cython/gudhi/__init__.py.in b/src/cython/gudhi/__init__.py.in
new file mode 100644
index 00000000..b2d2d3d7
--- /dev/null
+++ b/src/cython/gudhi/__init__.py.in
@@ -0,0 +1,40 @@
+from importlib import import_module
+
+"""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
+
+ Copyright (C) 2016 Inria
+
+ Modification(s):
+ - YYYY/MM Author: Description of the modification
+"""
+
+__author__ = "GUDHI Editorial Board"
+__copyright__ = "Copyright (C) 2016 Inria"
+__license__ = "https://gudhi.inria.fr/licensing/"
+__version__ = "@GUDHI_VERSION@"
+# This variable is used by doctest to find files
+__root_source_dir__ = "@CMAKE_SOURCE_DIR@"
+__debug_info__ = @GUDHI_CYTHON_DEBUG_INFO@
+
+from sys import exc_info
+from importlib import import_module
+
+__all__ = [@GUDHI_CYTHON_MODULES@]
+
+__available_modules__ = ''
+__missing_modules__ = ''
+
+# try to import * from gudhi.__module_name__
+for __module_name__ in __all__:
+ try:
+ __module__ = import_module('gudhi.' + __module_name__)
+ try:
+ __to_import__ = __module__.__all__
+ except AttributeError:
+ __to_import__ = [name for name in __module__.__dict__ if not name.startswith('_')]
+ globals().update({name: __module__.__dict__[name] for name in __to_import__})
+ __available_modules__ += __module_name__ + ";"
+ except:
+ __missing_modules__ += __module_name__ + ";"