Skip to content
Snippets Groups Projects
Unverified Commit 7caacb26 authored by René Fritze's avatar René Fritze
Browse files

[py] relocate bindings code to python subdir

parent ec596815
No related branches found
No related tags found
No related merge requests found
......@@ -27,13 +27,11 @@
#include "bindings.hh"
PYBIND11_PLUGIN(_common)
PYBIND11_MODULE(_common, m)
{
namespace py = pybind11;
using namespace pybind11::literals;
py::module m("_common", "dune-xt-common");
Dune::XT::Common::bindings::addbind_exceptions(m);
m.def("_init_mpi",
......@@ -87,8 +85,6 @@ PYBIND11_PLUGIN(_common)
return false;
#endif
});
return m.ptr();
}
#endif // HAVE_DUNE_PYBINDXI
......@@ -16,8 +16,8 @@
#include "fvector.pbh"
#include "fmatrix.pbh"
#include "configuration.pbh"
#include "numeric_cast.hh"
#include "string.hh"
#include "timedlogging.hh"
#include <dune/xt/common/numeric_cast.hh>
#include <dune/xt/common/string.hh>
#include <dune/xt/common/timedlogging.hh>
#endif // DUNE_XT_COMMON_BINDINGS_HH
......@@ -21,7 +21,7 @@ _test_logger_methods = list()
_init_mpi_methods = list()
_other_modules = ('xt.la', 'xt.grid', 'xt.functions', 'gdt')
from ._common import __dict__ as module
from dune.xt._common import __dict__ as module
to_import = [name for name in module if not name.startswith('_')]
globals().update({name: module[name] for name in to_import})
_init_logger_methods.append(module['_init_logger'])
......
......@@ -15,7 +15,7 @@
#include <dune/pybindxi/pybind11.h>
#include <dune/pybindxi/cast.h>
#include "configuration.hh"
#include <dune/xt/common/configuration.hh>
NAMESPACE_BEGIN(pybind11)
NAMESPACE_BEGIN(detail)
......
......@@ -23,7 +23,7 @@
#include <dune/pybindxi/pybind11.h>
#include "exceptions.hh"
#include <dune/xt/common/exceptions.hh>
namespace Dune {
namespace XT {
......
......@@ -16,7 +16,7 @@
#include <dune/pybindxi/pybind11.h>
#include <dune/pybindxi/cast.h>
#include "fmatrix.hh"
#include <dune/xt/common/fmatrix.hh>
#include "fvector.pbh"
......
......@@ -15,7 +15,7 @@
#include <dune/pybindxi/pybind11.h>
#include <dune/pybindxi/cast.h>
#include "fvector.hh"
#include <dune/xt/common/fvector.hh>
NAMESPACE_BEGIN(pybind11)
NAMESPACE_BEGIN(detail)
......
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