summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-05 15:32:30 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-05 15:32:30 (GMT)
commitac7cb05415af57b3752d4e26df9201f91ff0a339 (patch)
tree3948ffb3e63fc51c50953131d037ecaf769be292 /Tools
parent40813b1dbcb534dabeaa4cb3e05315927a1a1a0e (diff)
downloadcpython-ac7cb05415af57b3752d4e26df9201f91ff0a339.zip
cpython-ac7cb05415af57b3752d4e26df9201f91ff0a339.tar.gz
cpython-ac7cb05415af57b3752d4e26df9201f91ff0a339.tar.bz2
Fixed to run better in unix-Python, and to cater for bgenlocations
possibly being missing.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/bgen/bgen/scantools.py10
1 files changed, 7 insertions, 3 deletions
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 @@ try:
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 @@ if missing: raise "Missing Types"
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 @@ if missing: raise "Missing Types"
setattr(self, name[:-4], prog)
def initosspecifics(self):
- if MacOS:
+ if MacOS and CREATOR:
self.filetype = 'TEXT'
self.filecreator = CREATOR
else: