Fixed to run better in unix-Python, and to cater for bgenlocations
possibly being missing.
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py
index d5dc2af..5efa6fc 100644
--- a/Tools/bgen/bgen/scantools.py
+++ b/Tools/bgen/bgen/scantools.py
@@ -25,7 +25,11 @@
except ImportError:
MacOS = None
-from bgenlocations import CREATOR, INCLUDEDIR
+try:
+ from bgenlocations import CREATOR, INCLUDEDIR
+except ImportError:
+ CREATOR = None
+ INCLUDEDIR = os.curdir
Error = "scantools.Error"
@@ -236,7 +240,7 @@
self.line = ""
def initpaths(self):
- self.includepath = [':', INCLUDEDIR]
+ self.includepath = [os.curdir, INCLUDEDIR]
def initpatterns(self):
self.head_pat = r"^EXTERN_API[^_]"
@@ -263,7 +267,7 @@
setattr(self, name[:-4], prog)
def initosspecifics(self):
- if MacOS:
+ if MacOS and CREATOR:
self.filetype = 'TEXT'
self.filecreator = CREATOR
else: