NOTE NOTE NOTE: If you're running Panther (10.3) or later, ignore these
instructions -- you already have a useable Python.    -JGG


- The Python that Apple provides out-of-the-box on their Developer Tools CD
  will not work for us, because it's missing the necessary libpython library.
  To get this, you have to build from source.  I think that Panther may have
  a useable shared library version, but I haven't verified this or changed
  the RTcmix build system to use it.

- To build Python, you need to install the Apple Developer Tools, you
  have to know how to get around in the Terminal, and you need to be a
  member of the admin group.  (You probably are.)

  As of this writing (1/23/04), do the following...

   - Download the source tarball from www.python.org.  I grabbed
     Python-2.3.3.tar.bz2, and unpacked it with Stuffit Expander.
     (You could use "tar xfj Python-2.3.3.tar.bz2" instead.)  Then I
     moved the resulting "Python-2.3.3" folder into /usr/local/src.

   - Issue these commands inside the Python-2.3.3 directory:

      $ ./configure
      $ make                    (go get some coffee)
      $ sudo make install       (then enter your password if it asks)

   - Unless you did something special, this will install all the Python
     files in the /usr/local tree.

   - Before building RTcmix with Python support, set the PYTHON symbol
     in RTcmix/makefile.conf to "/usr/local/bin/python".

   - Do a "make && make install" from the top-level RTcmix directory.
     Then do this:

      $ cd RTcmix/docs/sample_scores/3.0/python
      $ PYCMIX < LONGCHAIN_1.py

     You should hear the groovy test music.  If it can't find PYCMIX,
     either you didn't install RTcmix again, or you need to type "rehash"
     at the shell prompt.

   - If PYCMIX doesn't appear in your RTcmix/bin directory, see if there is
     a PYMIX file in insts.base/MIX.  If there is, then you just need to
     say "make install".  If there isn't, then there's something messed up
     about either your Python build or your RTcmix build.  First, try
     going to the top-level RTcmix directory, and typing:

      $ make clean
      $ make && make install

  (More info about building Python from source is available at
  http://www.zope.org/Members/jens/docs/zope_osx, though this is
  geared toward people building Zope.)


John Gibson, 23 Jan 2004


-----------
Other stuff

- Namespace clashes with Python builtin functions:

      abs
      input
      max
      open
      pow
      round

   The cmix ones seem to have priority (because they were loaded
   most recently?).
  
- The ability to kill the job and still see peak stats doesn't work,
  though it does work in PCMIX.  Python is nuking our signal handler
  (sigint_handler in main.C) somehow?  Strange, because supposedly
  the interpreter is destroyed before we start playing score, by
  parse_score in Minc/parse_with_python.c.  The comments in parse_score
  imply that this used to work with Python 1.x.

  *** Looks like this is fixed with Python 2.3!

