diff --git a/src/python/magnum/CMakeLists.txt b/src/python/magnum/CMakeLists.txt index 31b3e98..f0c5896 100644 --- a/src/python/magnum/CMakeLists.txt +++ b/src/python/magnum/CMakeLists.txt @@ -40,7 +40,7 @@ target_link_libraries(magnum PRIVATE Magnum::Magnum) set_target_properties(magnum PROPERTIES FOLDER "python" OUTPUT_NAME "_magnum" - LIBRARY_OUTPUT_DIRECTORY ${output_dir}/magnum) + LIBRARY_OUTPUT_DIRECTORY ${output_dir}) if(Magnum_GL_FOUND) set(magnum_gl_SRCS diff --git a/src/python/magnum/__init__.py b/src/python/magnum/__init__.py index 0a105e0..efe0907 100644 --- a/src/python/magnum/__init__.py +++ b/src/python/magnum/__init__.py @@ -25,13 +25,13 @@ """Root Magnum module""" -from ._magnum import * +from _magnum import * # This feels extremely hackish, but without that it wouldn't be possible to # do `import magnum.math`, which is weird (`from magnum import math` works, # tho, for whatever reason) import sys -sys.modules['magnum.math'] = _magnum.math +sys.modules['magnum.math'] = math __all__ = [ 'Deg', 'Rad', diff --git a/src/python/setup.py.cmake b/src/python/setup.py.cmake index 8f90e64..06494a9 100644 --- a/src/python/setup.py.cmake +++ b/src/python/setup.py.cmake @@ -32,7 +32,7 @@ from setuptools.command.build_ext import build_ext extension_paths = { # Filled in by cmake 'corrade.containers': '$', - 'magnum._magnum': '$', + '_magnum': '$', 'magnum.gl': '${magnum_gl_file}', 'magnum.meshtools': '${magnum_meshtools_file}', 'magnum.primitives': '${magnum_primitives_file}',