/Lib/plat-mac/bgenlocations.py

http://unladen-swallow.googlecode.com/ · Python · 58 lines · 24 code · 9 blank · 25 comment · 8 complexity · 4582f58e6ab2522aaef19e6099645e9b MD5 · raw file

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