[Pythonmac-SIG] Doing it differently: Module management / installation

Robin Dunn robin@alldunn.com
Wed, 23 Oct 2002 14:43:54 -0700


Bill Bumgarner wrote:
> (I have been following the 'Let's do it completely different!' thread 
> with quite a bit of interest -- this is a direction that I have long 
> felt that Python on OS X should take.   I'll comment more on that later.)
> 
> On Wednesday, October 23, 2002, at 04:44 AM, 
> pythonmac-sig-request@python.org wrote:
> 
>> Maybe then what is needed is to have a Applications/Python folder, and
>> have an "Extensions" folder inside that (or Lib/site-packages, etc.)
>> that people can drop modules into. That way, Mac users can add/install
>> modules without having to interact with the Terminal or Unix filesystem.
> 
> 
> In general, there should be no requirement that anything be installed in 
> /Applications.   /Applications is Apple's domain and third parties 
> shouldn't touch it (I can't begin to tell you how much it offends my 
> security minded and multi-user aware self when a third party insists on 
> scribbling in /Applications/... many many reasons why that is just 
> stupid).   Furthermore, requiring anything to be dropped in 
> /Applications prevents any user who does not have admin rights from 
> installing the software-- basically, it eliminates the installation of 
> the software by any student using a lab computer unless the network 
> admins sanction it.
> 
> In talking extensions -- things that are not standalone applications -- 
> it should be modeled after the "standards" set forth by Apple.   That 
> is, there should be a set of search paths that are added to sys.path.  
> Most likely:
> 
> ~/Library/Python/Extensions
> ~/Developer/Python/Extensions
> /Library/Python/Extensions
> /Network/Library/Python/Extensions
> /Network/Developer/Python/Extensions
> /System/Library/Python/Extensions
> /Developer/Python/Extensions
> 

To work well with distutils these should probably be something like:

~/Library/Python/lib/python2.3/site-packages
[and etc.]

This is because when you use the --root option to the distutils install 
command it will use the given path as the $prefix and then build the 
standard directory structure under it.  This also lets a user install 
extensions built for different versions of Python.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!