From 4cca0992976f26adf13e0f305ed502573f56c16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 13 May 2019 22:08:33 +0200 Subject: [PATCH] python: make `import magnum.math` working. --- src/python/magnum/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/python/magnum/__init__.py b/src/python/magnum/__init__.py index df831e1..70a3671 100644 --- a/src/python/magnum/__init__.py +++ b/src/python/magnum/__init__.py @@ -27,6 +27,12 @@ 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 + __all__ = [ 'Deg', 'Rad',