Skip to content

Commit 600d6de

Browse files
authored
Merge pull request #11 from jonwright/issue-c2ImageD11-cross-test
Add C2_BACKEND flag and C2_VERSION to cImageD11.py
2 parents 421e6e5 + be8739a commit 600d6de

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ImageD11/cImageD11.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
if os.environ.get("IMAGED11_USE_C2") == "1":
1010
from c2ImageD11 import *
11+
C2_BACKEND = True
1112
else:
1213
try:
1314
from ImageD11._cImageD11 import *
@@ -22,6 +23,13 @@
2223
print("or:")
2324
print(" python setup.py build_ext --inplace")
2425
raise
26+
C2_BACKEND = False
27+
28+
try:
29+
import c2ImageD11 as _c2
30+
C2_VERSION = getattr(_c2, "__version__", None)
31+
except ImportError:
32+
C2_VERSION = None
2533

2634
# Check for the use of openmp interactions with os.fork and multiprocessing
2735

0 commit comments

Comments
 (0)