From 95b66f3276552c0d9002953bc9036ce2fb442c7b Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 15 Jul 2004 15:06:07 +0000 Subject: Allow overriding of bgen pathnames in an optional module bgenlocationcustomize. Editing of bgenlocations.py isn't easy if your Python was supplied by Apple. --- Lib/plat-mac/bgenlocations.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/plat-mac/bgenlocations.py b/Lib/plat-mac/bgenlocations.py index d4f2d70..19e1f02 100644 --- a/Lib/plat-mac/bgenlocations.py +++ b/Lib/plat-mac/bgenlocations.py @@ -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): -- cgit v0.12