Browse Source

python: make corrade.utility depend on corrade.containers.

It got imported in this order for doc generation and probably also in
all tests, but when imported alone, the signature of copy() is broken
because it references a not-yet-known type.
next
Vladimír Vondruš 2 years ago
parent
commit
335bbfc191
  1. 7
      src/python/corrade/utility.cpp

7
src/python/corrade/utility.cpp

@ -58,6 +58,13 @@ template<unsigned dimensions> void algorithmsCopy(py::module_& m) {
void utility(py::module_& m) { void utility(py::module_& m) {
m.doc() = "Utilities"; m.doc() = "Utilities";
#ifndef CORRADE_BUILD_STATIC
/* Need array views for copy() and others. These are a part of the same
module in the static build, no need to import (also can't import because
there it's _corrade.*) */
py::module_::import("corrade.containers");
#endif
algorithmsCopy<1>(m); algorithmsCopy<1>(m);
algorithmsCopy<2>(m); algorithmsCopy<2>(m);
algorithmsCopy<3>(m); algorithmsCopy<3>(m);

Loading…
Cancel
Save