[Pythonmac-SIG] Newbie Mac Question

Karl Merkley karl at elemtech.com
Fri Oct 8 23:38:49 CEST 2004


On Oct 8, 2004, at 3:12 PM, Bob Ippolito wrote:

>
> On Oct 8, 2004, at 5:01 PM, Karl Merkley wrote:
>
>> On Oct 8, 2004, at 2:50 PM, Bob Ippolito wrote:
>>
>>>
>>> On Oct 8, 2004, at 4:42 PM, Karl Merkley wrote:
>>>
>>>> I have an application that I am porting to the Mac.  On Linux it 
>>>> requires that I link against libpython.so.  It  appears that Mac OS 
>>>> X 10.3 does not include a libpython.dylib.   I _think_ I would like 
>>>> to stay compatible with the native python on the Mac.  What is the 
>>>> correct method for getting the shared library?  Assuming that I 
>>>> have to build it myself, what set of source do I download and 
>>>> build?  Are there any gotchas that I need to be aware of?
>>>
>>> Python on the Mac is built as a framework, which is linked to with 
>>> -framework Python rather than -lpython.  You should be asking 
>>> distutils how to link against Python.  Take a look at:
>>>
>>> >>> import distutils.sysconfig
>>> >>> distutils.sysconfig.get_config_vars()
>>>
>>> I believe the keys used for embedding python are LINKFORSHARED and 
>>> CFLAGSFORSHARED.
>> Thanks.  I'll take a look at that.  Like I said "newbie."  I don't 
>> even know what questions to ask yet!
>
> Well, from experience, I can say that porting software from a language 
> you're not terribly familiar with to a platform that you don't know 
> inside and out has quite a steep learning curve! :)  I've been at it 
> for over three and a half years (doesn't seem like that long, though) 
> and I still run into things that confuse me every now and again.
>
> -bob
>
>

I have should have just trusted my build system.  CMake rocks! 
(www.cmake.org)  I had already gotten Qt and vtk installed and I had to 
tell it where vtk lived but it found all the correct python and Qt 
settings all on its own.  Very cool.  I've already got it built and 
running.

	Thanks,
		Karl



More information about the Pythonmac-SIG mailing list