[Pythonmac-SIG] Appscript Installer 1.1a1

Bob Ippolito bob at redivi.com
Sat Jun 4 00:37:08 CEST 2005


On Jun 3, 2005, at 3:20 PM, Nick Matsakis wrote:

>
> On Fri, 3 Jun 2005, Bob Ippolito wrote:
>
>
>> Python extensions/packages don't and can't currently do things the
>> Mac way, trying to shoehorn it into the Mac way before it's ready
>> just causes unnecessary hassle for the developer and the user.  You
>> should just do it the way that everyone else does things, consistency
>> is good.
>>
>
> Answer this simple question, then: What is the right way to install
> third-party python additions on the Mac?  and don't say use "use
> bdist_mpkg".  I'm not interested in the mechanics but the end  
> result.  It
> sounds like the answer to this question is: "Extensions sould be  
> installed
> in the site-packages directory of the python framework".  Is that a  
> fair
> answer?

Extensions should be installed exactly how distutils installs them  
("sudo python setup.py install").  bdist_mpkg does exactly this.  The  
only exception is that it ensures that scripts end up in /usr/local/ 
bin rather than inside of a framework unless instructed to do otherwise.

>>> I was hoping to install 2.3 and 2.4 compatible binaries into
>>> /Library/Python/2.x/site-packages.  This is simple and more
>>> future-proof than the alternatives, as I see it.
>>>
>>
>> Don't.  Keep 2.3 and 2.4 separate.
>>
>
> /Library/Python/2.3/site-packages is separate from
> /Library/Python/2.4/site-packages.

Keep 2.3 and 2.4 *installers* separate.

That 2.4 location isn't valid, anyway.  Not until Apple starts  
distributing a Python 2.4 interpreter, anyway.

>> Easy enough to do wrong, too.  As far as documentation goes,
>> bdist_mpkg has documentation on the first google hit!
>>
>
> 300 words is not "documentation".  How do I actually run it once I've
> installed it?  How do I set .mpkg specific flags and metadata, pre and
> postflight scripts?

Like it says, run the bdist_mpkg tool in the same location as the  
setup.py.  That's all there is to it.

You don't have control over anything .mpkg-specific beyond what's  
covered in the help (i.e. a readme, etc.).  If you need fancy stuff,  
make a .mpkg with PackageMaker that does whatever junk you want to  
do, and reference the bdist_mpkg-built package.  bdist_mpkg is not a  
general replacement for PackageMaker, it is a way of pushing the last  
step of distutils on to Apple's installer.

-bob



More information about the Pythonmac-SIG mailing list