logo       

Re: Optional BSD package is required for (useable) Python?: msg#00059

python.apple

Subject: Re: Optional BSD package is required for (useable) Python?

On May 11, 2004, at 7:08 PM, Tom Pollard wrote:


On May 11, 2004, at 6:25 PM, Bob Ippolito wrote:
On May 11, 2004, at 4:51 PM, Tom Pollard wrote:
There's a python startup script in the package created by bundle-builder that sets a couple of environment variables and invokes python to run the bundled script. It is solely in order to run this script that the BSD environment needs to be installed. It could easily be replaced with a /bin/sh script if it was considered important to support users who didn't have /usr/bin/python installed already. That's the only change that would be required.

No, /bin/sh doesn't provide the execve functionality required.

Yes, I've heard you mention this execve issue, but I still don't appreciate what the issue is. My introduction to bundle-builder was through the BitPim project <http://bitpim.sourceforge.net/>, which distributes a Mac executable built with bundle-builder. Replacing the python startup script with a /bin/sh script in the BitPim bundle seemed to work fine, that is, the app still starts up correctly when double-clicked in the Finder, and that's the only thing that needs to work in this case.

It's possible that it works for that app, but it doesn't do what it's supposed to be doing. When finder starts an app it assigns a process serial number to that pid, if you don't use execve then the pid changes. There's a lot of funny things that can happen if you don't obey all the rules. For example, maybe you can start more than one simultaneous instance of BitPim, or some obscure things fail. I try not to follow the "whatever works" philosophy when developing software if I can avoid it :)

Perl might, though, but it's not worth doing when your application is going to fall over silently anyway if the BSD subsystem is not there.

My clear impression was that a standalone executable built by bundle-builder should no longer need anything from the BSD package, once started up. It's just to execute that first startup script that the BSD installation is required.

--semi-standalone depends on an existing Python.framework, which is in the BSD package. --standalone is not dependent on the BSD subsystem (other than the startup script).

Also, the BSD 'subsystem' is there whether you install the BSD package, or not. Things like bash, awk, sed, perl, etc., are all part of the core BaseSystem package. The optional BSD package just installs additional components (like /usr/bin/python) that are useful for working from the Terminal.

So, why would you expect your app to fall over silently if the BSD package hadn't been installed?

A completely standalone app that includes Python wouldn't (with a proper executable stub), but that's not really what we were talking about... or at least not what I was talking about.

-bob


_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/pythonmac-sig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise