]> granicus.if.org Git - python/commitdiff
Allow overriding of bgen pathnames in an optional module bgenlocationcustomize.
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 15 Jul 2004 15:06:07 +0000 (15:06 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 15 Jul 2004 15:06:07 +0000 (15:06 +0000)
Editing of bgenlocations.py isn't easy if your Python was supplied by Apple.

Lib/plat-mac/bgenlocations.py

index d4f2d70c39f2809ad8cf65778660b46495b401cc..19e1f022cb1af05e230b49912a466b627b8688a2 100644 (file)
@@ -31,6 +31,14 @@ TOOLBOXDIR="/Users/jack/src/python/Lib/plat-mac/Carbon"
 # Creator for C files:
 CREATOR="CWIE"
 
+# The previous definitions can be overriden by creating a module 
+# bgenlocationscustomize.py and putting it in site-packages (or anywere else 
+# on sys.path, actually)
+try:
+       from bgenlocationscustomize import *
+except ImportError:
+       pass
+
 if not os.path.exists(BGENDIR):
     raise Error, "Please fix bgenlocations.py, BGENDIR does not exist: %s" % BGENDIR
 if not os.path.exists(INCLUDEDIR):