| 1 | n/a | # |
|---|
| 2 | n/a | # Local customizations for generating the Carbon interface modules. |
|---|
| 3 | n/a | # Edit this file to reflect where things should be on your system. |
|---|
| 4 | n/a | # Note that pathnames are unix-style for OSX MachoPython/unix-Python, |
|---|
| 5 | n/a | # but mac-style for MacPython, whether running on OS9 or OSX. |
|---|
| 6 | n/a | # |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | import os |
|---|
| 9 | n/a | |
|---|
| 10 | n/a | from warnings import warnpy3k |
|---|
| 11 | n/a | warnpy3k("In 3.x, the bgenlocations module is removed.", stacklevel=2) |
|---|
| 12 | n/a | |
|---|
| 13 | n/a | Error = "bgenlocations.Error" |
|---|
| 14 | n/a | # |
|---|
| 15 | n/a | # Where bgen is. For unix-Python bgen isn't installed, so you have to refer to |
|---|
| 16 | n/a | # the source tree here. |
|---|
| 17 | n/a | BGENDIR="/Users/jack/src/python/Tools/bgen/bgen" |
|---|
| 18 | n/a | |
|---|
| 19 | n/a | # |
|---|
| 20 | n/a | # Where to find the Universal Header include files. If you have CodeWarrior |
|---|
| 21 | n/a | # installed you can use the Universal Headers from there, otherwise you can |
|---|
| 22 | n/a | # download them from the Apple website. Bgen can handle both unix- and mac-style |
|---|
| 23 | n/a | # end of lines, so don't worry about that. |
|---|
| 24 | n/a | # |
|---|
| 25 | n/a | INCLUDEDIR="/Users/jack/src/Universal/Interfaces/CIncludes" |
|---|
| 26 | n/a | |
|---|
| 27 | n/a | # |
|---|
| 28 | n/a | # Where to put the python definitions files. Note that, on unix-Python, |
|---|
| 29 | n/a | # if you want to commit your changes to the CVS repository this should refer to |
|---|
| 30 | n/a | # your source directory, not your installed directory. |
|---|
| 31 | n/a | # |
|---|
| 32 | n/a | TOOLBOXDIR="/Users/jack/src/python/Lib/plat-mac/Carbon" |
|---|
| 33 | n/a | |
|---|
| 34 | n/a | # Creator for C files: |
|---|
| 35 | n/a | CREATOR="CWIE" |
|---|
| 36 | n/a | |
|---|
| 37 | n/a | # The previous definitions can be overriden by creating a module |
|---|
| 38 | n/a | # bgenlocationscustomize.py and putting it in site-packages (or anywere else |
|---|
| 39 | n/a | # on sys.path, actually) |
|---|
| 40 | n/a | try: |
|---|
| 41 | n/a | from bgenlocationscustomize import * |
|---|
| 42 | n/a | except ImportError: |
|---|
| 43 | n/a | pass |
|---|
| 44 | n/a | |
|---|
| 45 | n/a | if not os.path.exists(BGENDIR): |
|---|
| 46 | n/a | raise Error, "Please fix bgenlocations.py, BGENDIR does not exist: %s" % BGENDIR |
|---|
| 47 | n/a | if not os.path.exists(INCLUDEDIR): |
|---|
| 48 | n/a | raise Error, "Please fix bgenlocations.py, INCLUDEDIR does not exist: %s" % INCLUDEDIR |
|---|
| 49 | n/a | if not os.path.exists(TOOLBOXDIR): |
|---|
| 50 | n/a | raise Error, "Please fix bgenlocations.py, TOOLBOXDIR does not exist: %s" % TOOLBOXDIR |
|---|
| 51 | n/a | |
|---|
| 52 | n/a | # Sigh, due to the way these are used make sure they end with : or /. |
|---|
| 53 | n/a | if BGENDIR[-1] != os.sep: |
|---|
| 54 | n/a | BGENDIR = BGENDIR + os.sep |
|---|
| 55 | n/a | if INCLUDEDIR[-1] != os.sep: |
|---|
| 56 | n/a | INCLUDEDIR = INCLUDEDIR + os.sep |
|---|
| 57 | n/a | if TOOLBOXDIR[-1] != os.sep: |
|---|
| 58 | n/a | TOOLBOXDIR = TOOLBOXDIR + os.sep |
|---|