Carbonized embedded MacPython

Just van Rossum just at xs4all.nl
Mon Apr 8 11:18:35 EDT 2002


You're much better off asking such specialized questions on the 
MacPython mailing list:
   http://www.python.org/sigs/pythonmac-sig/

Just


In article <f69ccee4.0204080600.21d8ac87 at posting.google.com>,
 mattmsykes at yahoo.co.uk (Matt M Sykes) wrote:

> Hi,
> 
> I would like to embed Python into an already-existing Carbon
> application.
> 
> The application is quite large, so removing/replacing all the Carbon
> API calls would be infeasible at this point due to time constraints.
> That is, I must use Carbonized Python libs.
> 
> I downloaded and installed MacPython22full.bin which contains some
> Carbon libs.  I soon found that I didn't have any header files.
> 
> On to the source.  There are two places to obtain sources: python.org
> and the MacPython homepage, http://www.cwi.nl/~jack/macpython.html.
> Note ftp://ftp.cwi.nl/pub/jack/python/mac/GUSI2-for-MacPython22.sit is
> a broken link at the MacPython homepage.
> 
> The source at the MacPython homepage does not have a configure script
> nor a project file; how do I build it?  It does have *some* prj files
> but none for building python.  Hoping for the best, I tried using
> those header files to compile an embedded-python test program with my
> Carbon libs.  My machine promptly crashed when I ran it.  To me this
> means the header files don't match the libs I have.  The exact same
> code runs perfectly on Windows and FreeBSD.
> 
> Next: sources from the ftp site mentioned at python.org:
> ftp://ftp.python.org/pub/python/2.2.
> 
> This source appears to require the unix-type build environment on OS
> X; the instructions are to run the configure script and compile with
> the unix-type (GNU?) compiler using make.
> 
> From what I understand, I must use the same compiler (same run-time
> environment) to build both python and my target application if I wish
> to embed python in the target application.
> 
> For political and practical reasons beyond my control, the target
> application must use the Metrowerks compiler (I am not in charge of
> the Mac builds, I'm just helping with the embedded python side of it).
> 
> There is a mwerks directory in the sources, but the README there is
> clearly out of date as none of the files it mentions exist.  There is
> one project file called 'frozen.prj' which appears to be out of date
> also.  I am not convinced this was the source used to build the Carbon
> MacPython at the MacPython website.  I believe Jack did some magic
> which is not included here.
> 
> All I really need (I think) are the exact header files which were used
> to build the Carbon libs which are available at the MacPython website,
> as well as info on the precise build environment and settings.  The
> good news is that it says the Carbon libs were built with the
> Metrowerks compiler.
> 
> Is there anyone who has embedded Python into a Carbon app?  Is there
> anyone who is able to build Carbon-MacPython from sources (using the
> Metrowerks compiler)?
> 
> Any help would be appreciated.
> 
> --Matt



More information about the Python-list mailing list