diff --git a/ImageD11/cImageD11.py b/ImageD11/cImageD11.py index 909c4858..5800d210 100644 --- a/ImageD11/cImageD11.py +++ b/ImageD11/cImageD11.py @@ -8,6 +8,7 @@ if os.environ.get("IMAGED11_USE_C2") == "1": from c2ImageD11 import * + C2_BACKEND = True else: try: from ImageD11._cImageD11 import * @@ -22,6 +23,13 @@ print("or:") print(" python setup.py build_ext --inplace") raise + C2_BACKEND = False + +try: + import c2ImageD11 as _c2 + C2_VERSION = getattr(_c2, "__version__", None) +except ImportError: + C2_VERSION = None # Check for the use of openmp interactions with os.fork and multiprocessing