diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b015648c09a5e6e7376ca6ded8bce24e4113da3..232eda0db64d9be4b7c3c9ad15deef3a53f169b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ dune_project() add_subdirectory("dune") add_subdirectory("doc") add_subdirectory("lib") +add_subdirectory("python") # finalize the dune project, e.g. generating config.h etc. finalize_dune_project(GENERATE_CONFIG_H_CMAKE) diff --git a/dune/CMakeLists.txt b/dune/CMakeLists.txt index 933ff889d1110658837e180f86b2aaa8717e36cf..86feda5022f7e264e1ac0c8f91a7ddc42e0452ab 100644 --- a/dune/CMakeLists.txt +++ b/dune/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(geometry) +add_subdirectory(python) diff --git a/dune/python/CMakeLists.txt b/dune/python/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..933ff889d1110658837e180f86b2aaa8717e36cf --- /dev/null +++ b/dune/python/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(geometry) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..bf6f08c0410bb4c3fcac06cfadfb8be2eeb46376 --- /dev/null +++ b/python/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(dune) + +configure_file(setup.py.in setup.py) diff --git a/python/dune/CMakeLists.txt b/python/dune/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..a57867b275325a42830280415ddb98983025e42e --- /dev/null +++ b/python/dune/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(geometry) +add_python_targets(dune + __init__ +) diff --git a/python/dune/__init__.py b/python/dune/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..de40ea7ca058e07a399acf61529d418c07eeee61 --- /dev/null +++ b/python/dune/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/python/setup.py.in b/python/setup.py.in new file mode 100644 index 0000000000000000000000000000000000000000..903b0b5fc12bf61e5b742878178a01fb76dd7f62 --- /dev/null +++ b/python/setup.py.in @@ -0,0 +1,12 @@ +from setuptools import setup, find_packages + +setup(name="dune.geometry", + namespace_packages=['dune'], + description="Python lib for dune", + version="${DUNE_PYTHON_VERSION}", + author="Andreas Dedner and Martin Nolte", + packages = find_packages(), + zip_safe = 0, + package_data = {'': ['*.so']}, + install_requires = ['portalocker'] + )