blob: 7643e4bae85d6852a2db0dfd192908561197340f [file] [log] [blame]
Jack Jansen6573f312002-08-05 14:56:04 +00001#
2# Local customizations for generating the Carbon interface modules.
3# Edit this file to reflect where things should be on your system.
4# Note that pathnames are unix-style for OSX MachoPython/unix-Python,
5# but mac-style for MacPython, whether running on OS9 or OSX.
6#
7
Christian Heimesc5f05e42008-02-23 17:40:11 +00008import os
Jack Jansen6573f312002-08-05 14:56:04 +00009
Benjamin Peterson23681932008-05-12 21:42:13 +000010from warnings import warnpy3k
11warnpy3k("In 3.x, the bgenlocations module is removed.")
12
Jack Jansen6573f312002-08-05 14:56:04 +000013Error = "bgenlocations.Error"
14#
15# Where bgen is. For unix-Python bgen isn't installed, so you have to refer to
16# the source tree here.
Jack Jansen10d176f2003-11-19 16:12:08 +000017BGENDIR="/Users/jack/src/python/Tools/bgen/bgen"
Jack Jansen6573f312002-08-05 14:56:04 +000018
19#
20# Where to find the Universal Header include files. If you have CodeWarrior
21# installed you can use the Universal Headers from there, otherwise you can
22# download them from the Apple website. Bgen can handle both unix- and mac-style
23# end of lines, so don't worry about that.
24#
Jack Jansen10d176f2003-11-19 16:12:08 +000025INCLUDEDIR="/Users/jack/src/Universal/Interfaces/CIncludes"
Jack Jansen6573f312002-08-05 14:56:04 +000026
27#
28# Where to put the python definitions files. Note that, on unix-Python,
29# if you want to commit your changes to the CVS repository this should refer to
30# your source directory, not your installed directory.
31#
Jack Jansen10d176f2003-11-19 16:12:08 +000032TOOLBOXDIR="/Users/jack/src/python/Lib/plat-mac/Carbon"
Jack Jansen6573f312002-08-05 14:56:04 +000033
34# Creator for C files:
35CREATOR="CWIE"
36
Tim Peters182b5ac2004-07-18 06:16:08 +000037# The previous definitions can be overriden by creating a module
38# bgenlocationscustomize.py and putting it in site-packages (or anywere else
Jack Jansen95b66f32004-07-15 15:06:07 +000039# on sys.path, actually)
40try:
Tim Peters182b5ac2004-07-18 06:16:08 +000041 from bgenlocationscustomize import *
Jack Jansen95b66f32004-07-15 15:06:07 +000042except ImportError:
Tim Peters182b5ac2004-07-18 06:16:08 +000043 pass
Jack Jansen95b66f32004-07-15 15:06:07 +000044
Jack Jansen6573f312002-08-05 14:56:04 +000045if not os.path.exists(BGENDIR):
Jack Jansen0ae32202003-04-09 13:25:43 +000046 raise Error, "Please fix bgenlocations.py, BGENDIR does not exist: %s" % BGENDIR
Jack Jansen6573f312002-08-05 14:56:04 +000047if not os.path.exists(INCLUDEDIR):
Jack Jansen0ae32202003-04-09 13:25:43 +000048 raise Error, "Please fix bgenlocations.py, INCLUDEDIR does not exist: %s" % INCLUDEDIR
Jack Jansen6573f312002-08-05 14:56:04 +000049if not os.path.exists(TOOLBOXDIR):
Jack Jansen0ae32202003-04-09 13:25:43 +000050 raise Error, "Please fix bgenlocations.py, TOOLBOXDIR does not exist: %s" % TOOLBOXDIR
Tim Peters182b5ac2004-07-18 06:16:08 +000051
Jack Jansen6573f312002-08-05 14:56:04 +000052# Sigh, due to the way these are used make sure they end with : or /.
53if BGENDIR[-1] != os.sep:
Jack Jansen0ae32202003-04-09 13:25:43 +000054 BGENDIR = BGENDIR + os.sep
Jack Jansen6573f312002-08-05 14:56:04 +000055if INCLUDEDIR[-1] != os.sep:
Jack Jansen0ae32202003-04-09 13:25:43 +000056 INCLUDEDIR = INCLUDEDIR + os.sep
Jack Jansen6573f312002-08-05 14:56:04 +000057if TOOLBOXDIR[-1] != os.sep:
Jack Jansen0ae32202003-04-09 13:25:43 +000058 TOOLBOXDIR = TOOLBOXDIR + os.sep