[Pythonmac-SIG] Ownership of installed Python on Mac

Ned Deily nad at acm.org
Wed Aug 10 00:38:28 CEST 2011


In article <nad-8CF749.14423009082011 at news.gmane.org>,
 Ned Deily <nad at acm.org> wrote:

> In article <nad-12DCDD.14311109082011 at news.gmane.org>,
>  Ned Deily <nad at acm.org> wrote:
> 
> > In article 
> > <CAKCKLWwbY2DAywF=f_k=h9ovkHJjq+prKng60q9d5Xte+VGKjg at mail.gmail.com>,
> >  Michael Foord <fuzzyman at gmail.com> wrote:
> > > I don't believe that is actually the case in Lion due to the changes 
> > > pointed
> > > out by Nicholas.
> > Odd!  So far, this works for me on Lion with the current python.org 
> > installer (3.2.1 at least).  Perhaps you can be more specific about 
> > exactly how to reproduce what has changed for you.
> 
> Ah, a thought!  I have been testing with a vanilla Lion system with a 
> freshly-installed python.org Pythons.  In that case, the permissions of 
> the files in /Library/Frameworks/Python.framework are being set as 
> specified by the python.org installer.  Perhaps you are using a 
> python.org Python that was on a system upgraded from Snow Leopard?  In 
> that case, the Apple upgrade process may have mucked with the 
> permissions of the existing files.  Reinstalling using the python.org 
> installers would likely take care of that.  But it is something we 
> should document and or consider changing.

Yes, reinstalling Python using the python.org installer fixes it because 
the installer's post-install script simply does a chgrp -R admin and 
chgrp -R g+w to the version it installed.  That should be 
non-destructive, i.e. existing packages installed in site-packages 
should not disturbed so, if a user is not comfortable with the command 
line, reinstalling with a python.org installer after an upgrade to Lion 
is viable.  Also, because the permissions are set this way rather than 
explicitly in an installer bom, the Disk Utility.app (or diskutil) 
Repair Permissions function doesn't help for this.

On my high-priority list of things to do is to update the "Using Python 
on a Macintosh" section of the "Python Setup and Usage" standard doc as 
well as http://www.python.org/download/mac/ both of which are very 
out-of-date.  There is the new http://www.python.org/download/mac/tcltk/ 
which I have been keeping up-to-date.  Somewhere in there or in the wiki 
should be a section on upgrading which could include things like this.

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list