From 75198d8971a6c84df97294bebe5bb7ec166d42b3 Mon Sep 17 00:00:00 2001 From: Martin Nolte <nolte.mrtn@gmail.com> Date: Mon, 29 Jan 2018 10:21:20 +0100 Subject: [PATCH] migrate the C++ _<name> modules directly into the dune namespace This allows them to be loaded without loading the corresponding Python mdoule, avoiding circular dependencies. --- CMakeLists.txt | 2 -- __init__.py | 2 +- _typeregistry.cc | 12 ------------ 3 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 _typeregistry.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index f3c5dd610..d99467457 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,3 @@ add_python_targets(typeregistry __init__ ) - -dune_add_pybind11_module(NAME _typeregistry) diff --git a/__init__.py b/__init__.py index a8b21d74f..bfd0dde7e 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +1 @@ -from ._typeregistry import * +from .._typeregistry import * diff --git a/_typeregistry.cc b/_typeregistry.cc deleted file mode 100644 index 203d4aad1..000000000 --- a/_typeregistry.cc +++ /dev/null @@ -1,12 +0,0 @@ -// -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -// vi: set et ts=4 sw=2 sts=2: -#include <config.h> - - -#include <dune/python/common/typeregistry.hh> - - -PYBIND11_MODULE( _typeregistry, module ) -{ - Dune::Python::registerTypeRegistry(module); -} -- GitLab