home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / README.OpenSTEP < prev    next >
Encoding:
Text File  |  1997-03-22  |  3.4 KB  |  74 lines

  1. # -*- indented-text -*-
  2. #
  3. # This file is part of the Python for OpenSTEP package.
  4. #
  5.  
  6. Python for OpenSTEP, Version 0.01
  7.  
  8. This package will let you build your Python interpreter as any other
  9. native ProjectBuilder project.
  10.  
  11. You will get a dynamically loadable framework containing the shared
  12. library, which is the sum of the standard libPython.a, libParser.a,
  13. libObjects.a and libModules.a with all the published headers; it also
  14. contains, as resources, the Python Library and possible series of
  15. bundles containing extension.  And of course the interpreter, built on
  16. top of the framework.
  17.  
  18. It is a perfectly standard Python plus the support for the new dynamic
  19. loading capabilities of OpenSTEP 4.1. The interpreter knows how to load
  20. shared modules, both "bundled" ones and the traditional .so modules,
  21. but the current implementation of the dynamic loader on OpenSTEP is
  22. not able to actually load traditional .so modules... but you have
  23. Bundles! This implies that you shouldn't put '*share* in your Setups:
  24. the machinery to handle them works ok, and they get installed as
  25. resources of the framework, but python won't load them. Converting a
  26. .so module to a bundle is simple: just follow the included pyrl.bundle
  27. model. I will think about an automatic generator for them, maybe
  28. adding a *bundled* directive to the Setups.
  29.  
  30. For sure it's not a perfectly running Python, since it has bugs that
  31. should be removed before public consumption, and I will fix them,
  32. sooner or later... but let me know about the ones you discover.
  33.  
  34. The main one is the following: when you launch the interpreter, there
  35. is a considerable delay from when you see the banner to when you get
  36. the prompt. It may depend on the time it takes to load the framework,
  37. I really don't know, and I will investigate on it first.
  38.  
  39.  
  40. StEP by StEP
  41.  
  42. The package is implemented as a wrapper around the standard
  43. distribution. It was very easy to write a PB project, a little harder
  44. the work done trying to minimize the distribution, that is already too
  45. big to be nice. To do this I added the ability of automatically
  46. populate the project linking the appropriate sources directly from the
  47. standard distribution (BTW, this is actually done with hard links,
  48. implying that the package *must* on the same device!). 
  49.  
  50. Configure the interpreter as usual, and change Modules/Setup as
  51. needed: as I already said, be sure to remove the *shared* directive,
  52. since a) you won't be able to load shared modules, b) since this is a
  53. framework, also normal "static" modules are shared!, c) you may prefer
  54. "bundling" modules, expecially when they needs external libraries. On
  55. this topic, I suggest you to look at Python.fproj/pyrl.bproj/pyrl.m,
  56. the bundled version of my Pyrl module, there is everything you need to
  57. know.
  58.  
  59. Then go to the Contrib/OpenSTEP_PB directory, open its PB.project
  60. file, or run a direct "gnumake" (BTW, I'm really happy they used GNU
  61. make for PB!).
  62.  
  63. The first time this will create a Makefile.config executing a Perl
  64. Script (;-) on the config.status created by configure, containing
  65. every known autoconf variable with its value. After that the needed
  66. Python sources will be linked in the project directories.
  67.  
  68. If everything goes well, you will get a python binary, the interpreter
  69. itself, and a Python.framework directory: to test it out, the simplest
  70. thing to do is to create a symbolic link in your ~/Library/Frameworks/
  71. pointing to the framework, then launch the interpreter.
  72.  
  73. Good luck, 
  74. bye, lele.