diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2004-07-15 15:06:07 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2004-07-15 15:06:07 (GMT) |
commit | 95b66f3276552c0d9002953bc9036ce2fb442c7b (patch) | |
tree | 1d9af2e8a8a72a4620383927966916b2631657e5 /Lib | |
parent | ce17cf6da7544c90acffaa21682b527d1996506d (diff) | |
download | cpython-95b66f3276552c0d9002953bc9036ce2fb442c7b.zip cpython-95b66f3276552c0d9002953bc9036ce2fb442c7b.tar.gz cpython-95b66f3276552c0d9002953bc9036ce2fb442c7b.tar.bz2 |
Allow overriding of bgen pathnames in an optional module bgenlocationcustomize.
Editing of bgenlocations.py isn't easy if your Python was supplied by Apple.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/plat-mac/bgenlocations.py | 8 |
1 files changed, 8 insertions, 0 deletions
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): |