diff --git a/gltbx/gl.py b/gltbx/gl.py index e21cdd52f7..fae1e6b942 100644 --- a/gltbx/gl.py +++ b/gltbx/gl.py @@ -1,10 +1,11 @@ from __future__ import absolute_import, division, print_function -# import boost_adaptbx.boost.python as bp -# ext = bp.import_ext("gltbx_gl_ext") -# from gltbx_gl_ext import * -import OpenGL # implicit import -from OpenGL.GLU import * -from OpenGL.GL import * +try: + import OpenGL # implicit import + from OpenGL.GL import * +except ImportError: + import boost_adaptbx.boost.python as bp + ext = bp.import_ext("gltbx_gl_ext") + from gltbx_gl_ext import * def __function_taking_transposed_matrix(f): def wrapper(m): diff --git a/gltbx/glu.py b/gltbx/glu.py index 4676b1746d..85e21ab951 100644 --- a/gltbx/glu.py +++ b/gltbx/glu.py @@ -1,6 +1,8 @@ from __future__ import absolute_import, division, print_function -# import boost_adaptbx.boost.python as bp -# ext = bp.import_ext("gltbx_glu_ext") -# from gltbx_glu_ext import * -import OpenGL # implicit import -from OpenGL.GLU import * +try: + import OpenGL # implicit import + from OpenGL.GLU import * +except ImportError: + import boost_adaptbx.boost.python as bp + ext = bp.import_ext("gltbx_glu_ext") + from gltbx_glu_ext import *