logo       

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

python.apple

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

On May 11, 2004, at 4:51 PM, Tom Pollard wrote:

On Tue, May 11, 2004 at 04:18:31PM -0400, Bob Ippolito wrote:
I really don't think it's a big deal to simply tell the naive users who
go out of their way to deselect the BSD layer that they screwed up and
now they have to install it if they want to use your software. It's
not that hard to determine the presence of the BSD layer.

I think this condescending language about users "screwing up" their MacOS X installation by leaving out the BSD subsystem is a little bit bizarre and unprofessional. If it's an optional install, then Apple clearly disagrees with that point of view (as do I).

There's a whole heck of a lot of software that'll fall on its face if it's not there, including some of their own (fax cover sheets, for example). I'm obviously not suggesting that you should tell the user that they "screwed up" in those words, but you would pop up a message in the installer check script or on app execution that says something along the lines of:

FooApplication depends on the BSD subsystem of Mac OS X. Normally this is installed by default, but it does not appear to be present on your system. To install the BSD Subsystem, insert the Mac OS X Installation CD 1, or your hardware restore disc, and install BSD.pkg from /System/Installation/Packages. Please be sure to also run Software Update after this installation.

This could easily be done from my executable stub by replacing the __error__.sh script with an implementation that prints this message.

On May 11, 2004, at 4:26 PM, Nicholas Riley wrote:
So why can't packaged apps use the bundle Python too? From some of
the other emails I got the idea that Python was unusable without the
BSD layer installed,

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. 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.

The last time I brought this up, Bob Ippolito explained that this would make it impossible to use the bundled app as a "regular" app from both the Finder and the command line, but I never really appreciated that point. It sounded like bundle-builder2 would eliminate the problem in a more robust way, so it didn't seem worth pursuing. But, if I was going to ship an app based on the current bundle-builder, I would definitely hack it to use a shell startup script instead of the python script.

No, you should use the executable stub I developed instead. Even if you could find another suitable surrogate scripting language to do the dance, it would silently pass errors to the console, where my stub allows GUI reporting and customized error handling with a lot of nice features that you'd want when shipping a python-dependent application.

-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