Skip to content
Snippets Groups Projects
Commit 0fdea9f7 authored by Timo Koch's avatar Timo Koch
Browse files

[python] Make work with changes from dune-common MR 1054

parent 84e5bec9
No related branches found
No related tags found
1 merge request!2937Feature/python with dune 2.9
Pipeline #11363 passed
+2
......@@ -13,7 +13,7 @@ endif()
if(${dune-common_VERSION} VERSION_GREATER_EQUAL 2.9)
dune_python_install_package(
PATH "."
CMAKE_METADATA_FILE dumux/metadata.cmake
PACKAGENAME dumux
DEPENDS _common
CMAKE_METADATA_FLAGS DUNE_OPTS_FILE
)
......
......@@ -11,10 +11,14 @@ https://dumux.org/
"""
try:
from dune.common import registerExternalModule
from dune.packagemetadata import registerExternalModule
import pathlib
# register dumux to be recognized by dune-py (code generation module)
# as a module of the dune univers
registerExternalModule("dumux")
registerExternalModule(
moduleName="dumux",
modulePath=str(pathlib.Path(__file__).parent.resolve()),
)
except ImportError:
pass
......@@ -151,7 +151,7 @@ def propertiesHeaderPath():
"""Find the path to the properties.hh C++ header"""
path, _ = os.path.split(dumux.__file__)
metaDataFile = os.path.join(path, "data/metadata.cmake")
metaDataFile = os.path.join(path, "data/dumux.cmake")
if os.path.exists(metaDataFile):
data = {}
with open(metaDataFile, "r") as metaData:
......
......@@ -10,7 +10,7 @@ setup(
author_email="${ProjectMaintainerEmail}",
packages=find_packages(),
zip_safe=0,
package_data={"": ["*.so"]},
package_data={"": ["*.so"], "dumux": ["data/*.cmake"]},
install_requires=REQUIRED_PACKAGES,
include_package_data=True,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment