[Pythonmac-SIG] Creating binary packages on OSX

Russell E. Owen rowen at cesmail.net
Sat Feb 23 00:32:43 CET 2008


In article <47BF2DD3.6060709 at gmail.com>,
 Matthias Baas <matthias.baas at gmail.com> wrote:

> Hi,
> 
> I have a question about distributing binary package on OSX (I'm still 
> rather new to OSX but now that I have a Mac I'd like to provide an OSX 
> binary of an Open Source package of mine).
> I was using the bdist_mpkg distutils extension to create a binary and 
> could turn that into a *.dmg. Testing this installer on my own machine 
> works fine. So generating the binary is no problem at all (thanks to all 
> who contributed to this distutils extension! Great work! I hope this 
> will make it into the official Python build eventually)
> My question is rather about the requirements of the generated installer, 
> i.e. who can use it to install the package? Does the installer only work 
> with MacPython or will it work with any version of Python (provided that 
> the version number matches, of course)? Does the installer just copy the 
> files into a predefined directory that must be the same on all machines 
> or is it like the Windows installer and it figures out itself where 
> Python is installed and puts the files into the correct location?
> I'm creating the binary on Tiger. Will the binary work on Leopard as 
> well or does this require a recompile?
> 
> Is there anything else that needs to be considered to get a "true" OSX 
> binary package? (I made sure everything was compiled as a universal 
> binary, but that's about it)
> 
> I'm grateful for any infos on how to properly create a binary package on 
> OSX.

I'm sure others can speak with more authority, but I believe that your 
package will be compatible with any *framework* python (as long as the 
first two version fields match). It will not be compatible with 
non-framework pythons such as fink python (at least at one time).

Thus if a user has installed a framework python (in /Library/Frameworks 
or /Users/<user>/Library/Frameworks) then your package will be installed 
in that python's site-packages directory. This is buried deep in the 
framework. If the user has not installed a framework python then your 
package will be installed in the built-in python's site-packages 
directory (which on 10.4 is /Library/Python/2.3; I have no idea where it 
is on 10.5).

-- Russell



More information about the Pythonmac-SIG mailing list