home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Python 1.4 / Python 1.4 source / Mac / Relnotes-source < prev   
Encoding:
Text File  |  1996-08-28  |  3.7 KB  |  86 lines  |  [TEXT/R*ch]

  1. How to build Python from a source distribution.
  2. -----------------------------------------------
  3.  
  4. NOTE: These notes are for building a Python from a machine-independent
  5. source distribution, *not* for building a Python from a mac-specific
  6. source distribution.
  7.  
  8. You will need a Python source distribution in tar form. So, the
  9. first thing you need is a tar program for the mac. Suntar is
  10. reasonable and can be found at the info-mac sites. Edit the
  11. preferences to make it extract C sources with creator CWIE
  12. and .py files as text files with creator Pyth, this will save
  13. you work later.
  14.  
  15. You will also need CodeWarrior 8. If you have another development
  16. environment you are on your own, basically.
  17.  
  18. You may also need the img distribution and the stdwin distribution.
  19. If you don't want them you may have to edit some of the projects
  20. to remove references to them.
  21.  
  22. When you've extracted everything you may have to unpack the
  23. .hqx files in Mac:Resources and Mac:mwerks:Projects (but suntar
  24. may have done this for you already).
  25.  
  26. You have to remove Modules:fmmodule.c, the SGI fm module, which has a
  27. name conflict with the Mac Fmmodule.c.
  28.  
  29. Next, create your build directories. I use the following naming
  30. convention:
  31. build.macppc.shared        PowerPC shared-library
  32. build.mac68k.stand        68K non-shared
  33. and there are also projects for ppc standalone and some others, they
  34. may be useful at times. The project files expect the build directories
  35. to be located right in the main python folder, if you put them elsewhere
  36. you will have to edit the access paths.
  37.  
  38. Move MWCPythonCoreRuntime.µ, PythonCore.µ, PythonPPC.µ and
  39. PythonApplet.µ (from the Mac:mwerks:projects folder) to
  40. build.macppc.shared, move Python68K.µ to build.mac68k.stand.
  41.  
  42. Build the projects. For the PPC projects, keep the order given above.
  43. Do *not* run the python interpreter yet. First, move the interpreter
  44. to the main python folder. For PPC, also move PythonCore to the main
  45. python folder.
  46.  
  47. Now try your python interpreter, this will create an initial
  48. preferences file.
  49.  
  50. For 68K python you are now done.
  51.  
  52. For PPC Python, don't try complicated scripts yet, you first have to
  53. create the dynamically loadable modules. Create a folder PlugIns (in
  54. the toplevel python folder) and move all the projects that have
  55. "module" or "modules" in their name there. Build these projects. This
  56. will create a number of ".exp" files, edit these files to contain only
  57. all the "init" modules, and build the projects again. This latter step
  58. isn't really essential, so feel free to skip it.
  59.  
  60. The next step is to create aliases for the various modules that "live
  61. together" in one shared library. For this, take MkPluginAliases.py and
  62. MkPluginAliases.rsrc from the Mac:scripts folder and move or copy them
  63. to the python home folder.  Run the script from there.
  64.  
  65. If you haven't created all plugins you'll get some errors about files
  66. not existing, don't worry. Don't forget to move the scripts back.
  67.  
  68. Next, make an alias of PythonCore (also named PythonCore) and put it
  69. in System Folder:Extensions. This will ensure that you can run python
  70. anywhere, not just from the folder where PythonCore lives.
  71.  
  72. Most of your environment is now setup. You can try it by running
  73. EditPythonPrefs.py (in Mac:scripts), it should now work from there.
  74.  
  75. Lastly, you should setup some stuff needed for applet creation. First,
  76. you should put PythonApplet (or an alias to it) in the python home
  77. folder. Next, you should turn mkapplet.py (from mac:scripts) into an
  78. applet itself: double-click it and give it itself as input in the
  79. input file dialog.
  80.  
  81. Now that you have created mkapplet you can use this as a droplet:
  82. drag-and-drop python sources onto it (EditPythonPrefs.py and
  83. RunLibScript.py come to mind) and the applets will be created.
  84.  
  85.             Jack Jansen, CWI, 18 March 1996. 
  86.