Browse Source

python: actually install the corrade.pluginmanager module.

Pusing this to master was a misteak. Yum.
pull/8/head
Vladimír Vondruš 7 years ago
parent
commit
859309b07c
  1. 1
      src/python/CMakeLists.txt
  2. 3
      src/python/corrade/CMakeLists.txt
  3. 2
      src/python/corrade/__init__.py
  4. 4
      src/python/corrade/corrade.cpp

1
src/python/CMakeLists.txt

@ -47,6 +47,7 @@ add_subdirectory(magnum)
# configure_file() and then replacing generator expressions with file(GENERATE) # configure_file() and then replacing generator expressions with file(GENERATE)
foreach(target foreach(target
corrade_containers corrade_containers
corrade_pluginmanager
magnum_gl magnum_gl
magnum_meshtools magnum_meshtools
magnum_primitives magnum_primitives

3
src/python/corrade/CMakeLists.txt

@ -71,6 +71,9 @@ if(NOT CORRADE_BUILD_STATIC)
# point of static builds). It also nicely avoids problems with multiply-defined # point of static builds). It also nicely avoids problems with multiply-defined
# global data. # global data.
else() else()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/staticconfigure.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/staticconfigure.h)
list(APPEND corrade_SRCS ${corrade_containers_SRCS}) list(APPEND corrade_SRCS ${corrade_containers_SRCS})
list(APPEND corrade_LIBS Corrade::Containers) list(APPEND corrade_LIBS Corrade::Containers)

2
src/python/corrade/__init__.py

@ -33,7 +33,7 @@ import sys
# _corrade. The following feels extremely hackish, but without that it wouldn't # _corrade. The following feels extremely hackish, but without that it wouldn't
# be possible to do `import corrade.containers`, which is weird # be possible to do `import corrade.containers`, which is weird
# (`from corrade import containers` works, tho, for whatever reason) # (`from corrade import containers` works, tho, for whatever reason)
for i in ['containers']: for i in ['containers', 'pluginmanager']:
if i in globals(): sys.modules['corrade.' + i] = globals()[i] if i in globals(): sys.modules['corrade.' + i] = globals()[i]
# Prevent all submodules being pulled in when saying `from corrade import *` -- # Prevent all submodules being pulled in when saying `from corrade import *` --

4
src/python/corrade/corrade.cpp

@ -28,6 +28,10 @@
#include "corrade/bootstrap.h" #include "corrade/bootstrap.h"
#ifdef CORRADE_BUILD_STATIC
#include "corrade/staticconfigure.h"
#endif
namespace py = pybind11; namespace py = pybind11;
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863 /* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863

Loading…
Cancel
Save