Work in Progress on Mac Packages

Within these notes, the command-line term "directories" and GUI entity "folders" may be used interchangeably.

Working from the Mac disk image:


1. there seem to be some advantages of working right in the Mac GUI, for example drag-and-drop copying and the creation of aliases (links). CAVEAT: care is needed with option-drag which is supposed to create a copy in a target directory. For example, when option-dragging an alias that points to a folder, when the destination already contains an old alias of the same name, there is no over-writing, and instead the result is renamed and appeared like a file instead of a folder. When in doubt, in stead of option-dragging, use the File > Duplicate command and then relocate and rename the item.

2. a file (e.g. binary package GNUmed client) cannot be worked on within .dmg files mounted as volumes as these are read-only. Such contained files must first be drag-copied out of the disk image. I copied it to my Applications folder and maybe prematurely renamed it GNUmed 0.5.0) smile

3. the Mac offers a contextual (control-click) menu which, instead of launching what is, permits the user to open the package in the GUI. Within the binary package, the directory hierarchy to take account of is:


within which was 2.4 which is the old-packaged python herein referred-to as OldN.n, and within which exist several folders including Headers and Resources.

The task at hand

1. Overwrite the old client with a newer one

At the level Contents/Resources/client, replace the old client folder with one from a suitable release tarball.

2. If a newer Python is needed

Source may be any among:

  • System/Library/Frameworks/Python.framework/Versions/2.5 (Mac OS X 10.5 Leopard)
  • a MacPython release
  • a MacPorts installation., e.g.
    • /opt/local/var/macports/software/python25 which contains the binary
      • /opt/local/var/macports/software/python25/2.5.4_6+darwin_9+macosx/opt/local/bin/python2.5

Destination for the copy of the NewN.n folder is the binary package's Versions at:
which should result in a newer python residing (for now) at the same level as the old one e.g.

The within-Versions alias Current


  • needs deletion (as pointing to the old python directory OldN.n)
  • needs replacement with an alias to the new python folder NewN.n:
    • select the new python folder… with Command+L, create
    • rename the result as "Current"
    • it should, by default, be sitting at the same level as N.n

The within-Python.framework alias Resources


  • needs deletion (as pointing to the old python directory OldN.n/Resources)
  • needs replacement with an alias to the new python folder NewN.n/Resources
    • with Command+L, create Resources alias
    • relocate this alias into Python.framework
    • rename it to Resources

The within-Python.framework alias Headers


  • needs deletion (as pointing to old python directory OldN.n/include/pythonOldN.n)
  • needs replacement with an alias to the new python folder NewN.n/include/pythonNewN.n
  • to save hassle
    • duplicate (Command + D) the already-existing alias 2.5/Headers
    • resulting alias is automatically named pythonNewN.n
    • drag it to Python.framework
    • rename it as Headers

The within-Python.framework alias Python


  • delete the above alias Python
  • replace with alias to Versions/NewN.n/Python

4. Provide a suitably-updated site-packages folder

   NewN.n/lib/pythonNewN.n/<missing> e.g.

i) copy, to the above directory, the earlier-packaged


within which resided, at varying degrees of now-out-datedness:
  • 18 Oct 2006 README
  • 25 Dec 2007 mx
  • 25 Dec 2007 psycopg2
  • 25 Dec 2007 psycopg2-2.0.2-py2.4.egg-info
  • 29 Nov 2007 wx-2.8-mac-unicode
  • #FYI: contains: wx wxPython
  • 29 Nov 2007 wx.pth
  • 29 Nov 2007 wxaddons
  • 29 Nov 2007
  • 25 Dec 2007 wxversion.pyo

ii) and into the resulting


replace any newer or additionally-needed dependencies:

(a) available from Leopard-native:

   /opt/local/lib/python2.5/site-packages/psycopg2 <br>
   /opt/local/lib/python2.5/site-packages/psycopg2-2.0.9-py2.5.egg-info <br>

b) available from an already-done-on-machine MacPort install

   /opt/local/var/macports/software/py25-psycopg2 <br>
   which by the way contains:<br>

5. Refactor any cumulated site-packages components:

Directory listing of site-packages (pending removal of obsoletes):
Topic revision: 22 Aug 2009, JamesBusser
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark