[Pythonmac-SIG] Compiling mxTextTools for the MAC

Yair Benita Y.Benita@pharm.uu.nl
Fri, 13 Jul 2001 16:46:09 +0200


on 13/7/2001 0:06, Jack Jansen at jack@oratrix.nl wrote:

> 
> Recently, Yair Benita <Y.Benita@pharm.uu.nl> said:
>> I am trying to install Biopython on the Mac.
>> mxTextTools is essential for Biopython and thus I am trying to compile it.
>> It has a setup.py file and when trying to build the extensions with
>> distutils I get:
>> distutils.errors.DistutilsPlatformError: Can only make SHARED_LIBRARY or
>> SHARED_OBJECT targets on the Mac
> 
> If someone wants to look into adding the missing functionality to
> macpython-distutils that would be very welcome. Don't count on me
> doing it within a reasonably short time, there's far too many things
> on my todo list already.
> 
> Here's some hints for when someone wants to tackle it, and I'll always
> be happy to supply more info, of course.
> 
> The main body of works is to get mkcwproject to create the CodeWarrior
> project file. If you look in :Mac:Lib:mkcwproject:template-ppc or
> ...-carbon you'll see that there's a set of xml files there. These
> files are templates, and they contain various %(name)s
> constructs. These %()s escapes are filled in by the driver
> (cwxmlgen.py), all the .xml files except the toplevel one,
> template.prj.xml, are then again stored into strings, the %(tmp_xxxx)s
> ones, and finally template.prj.xml is shoved through this whole
> process.
> 
> The difficult bit is figuring out what needs to go into the various
> .xml bits. The best route (what I did for the template-carbon, which
> is newer than template-ppc) is to manually create a project for the
> sort of target you need, let's say a classic ppc application. You save
> this project as an xml file. Next, you copy an existing template to
> template-ppc-application, modify mkcwproject to know about the new
> template, and present mkcwproject with the input that should
> eventually result in the same project file as what you manually
> created in the step above.
> 
> Compare this generated XML file with the XML file you saved from the
> manually generated correct project and you should be able (with some
> gnashing of teeth) to modify the template-ppc-application files to
> suit your needs.
> 
> Oh yes, what may help a bit too is to first update the existing
> template to what your current version of CodeWarrior generates. That
> should be fairly easy (save the generated project as XML again and
> compare the generated XML with the generated-opened-and-saved-as-xml
> file.
> 
> All in all it's not for the faint of heart, but it should be doable if
> someone sets their mind to it.
> --
> Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
> Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
> www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm
> 

OK, I am not even going to pretend to be able to add functionality to
macpython-distutils. I wish I had those skills, but I'm just not there yet.
Is it possible, as a temporary solution, to generate the xml project file
from the setup.py file and manually import it to codewarrior?
Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Utrecht University