[Pythonmac-SIG] Optional BSD package is required for (useable) Python?

Glenn Andreas gandreas at mac.com
Tue May 11 15:48:19 EDT 2004


At 3:23 PM -0400 5/11/04, Bob Ippolito wrote:
>On May 11, 2004, at 3:12 PM, Chris Barker wrote:
>
>>
>>>>So any idea how we can get this out of the "optional" BSD layer 
>>>>install?  (after all, /usr/bin/perl is in the base install)
>>
>>Well, if perl is there, python should be.

I certainly will agree with that.

>>However, /usr//bin/python is a symlink to /usr/bin/python2.3, which 
>>is a symlink to the executable in the Framework, which is always 
>>there, as I understand it. So option

As near as I can tell from lsbom, it isn't.  Only the headers & 
(shared macho) library are installed.  All the ".py" file and the 
executable aren't.  So trying to fake or create a /usr/bin/python on 
the fly won't work.  You could probaby make your own version of 
/usr/bin/python in your own bundle (something that links 
Python.framework, grabs stdio and used the standard embedding 
support) but without the python standard library you're still going 
to be extremely limited.

>There are two problems you can have.  You can't link to the 
>framework properly (boom! link error), or the Python code doesn't 
>work.  My executable stub handles both of these situations elegantly 
>and anyone who cares should take a look at it.  If your software is 
>not Python based but uses Python (I believe Glenn is in this camp), 
>then you can just as easily rip code out of my executable stub and 
>use it in your own program.  I don't care, and the license permits.

The other case is wanting to write python scripts, in, say, an 
installer.  Since /usr/bin/python may not be there (nor any other 
form of executable nor the python libraries you'd use) it pretty much 
rules out using it (reliably & safely) as a post-installation script.

This also means that the PDF workflow that they demoed at last years 
WWDC potentially won't work either - not sure what good claiming 
Quartz bindings for Python (listed on 
http://www.apple.com/macosx/newfeatures/creativeprofessionals.html) 
does if you can't run python scripts without the "optional" BSD layer.

Perhaps a bunch of radar bugs might help to resolve this (and 
attending the scripting feedback forum at WWDC).

-- 
Glenn Andreas                      gandreas at gandreas.com 
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know



More information about the Pythonmac-SIG mailing list