how to build a MacOS universal python package including external dependencies

Jaime Huerta Cepas jhuerta at cipf.es
Thu Sep 25 04:11:34 EDT 2008


Thanks Mathieu,

I think MacPorts will be the easiest way (all dependencies are available).
I could even base the installation script on  "port" commands.
The major problem will be to compile Qt4, which takes hours and requires
X11.

thnks, again.
Jaime.



On Wed, Sep 24, 2008 at 6:44 PM, Mathieu Prevot <mathieu.prevot at gmail.com>wrote:

> 2008/9/24 Jaime Huerta Cepas <jhuerta at cipf.es>:
> > Hi all,
> >
> > I have developed a set python libraries that provide several scientific
> > methods to analyse and visualize certain type of biological data.  This
> > libraries are based on many external python modules, such as python-mysql
> > python-sip or python-qt4. I use GNU/linux to develop my tools and I found
> no
> > problems into installing all dependencies, however it does not seem to be
> > that easy on MacOS. I am sure that all the dependencies (qt4, pyqt4 ,
> > mysqldb, scipy, numpy) are cross platform, but when you are trying to
> > publish your tool in an academic journal, most referees (many of them
> using
> > MacOS) expect some kind of straightforward installation process for the
> > tool.
> >
> > I wonder if there would be a way in which I could compile all the
> > dependencies and libraries in a MacOs system and then building a static
> > universal binary that I can distribute. I guess  it should be possible,
> but
> > I am not sure how difficult it might be, and whether all dependencies
> (qt4
> > is huge) can be packaged together.
>
> IMHO this is too complex to commit. Macport is a way to do what you
> want, but packages may not be up to date enough. Maybe the easiest and
> simplest way for you to do this is to write a script that will
> download, compile and install everything.
>
> The script should work like:
>
> sudo all_in_one_script.py
>
> and then wait for jobs to be done. Your script will need to know if a
> package was sucessfully installed and then continue or take steps and
> say it. For a complex set of dependencies, I recommend you to write
> Makefiles.
>
> For instance, in pseudo-code:
> if /usr/local/lib/libfoo.dylib doesn't exist
>  download foo
>  install foo
>
> if python-module foo doesn't exist
>  download foo
>  python foo/setup.py install
>
> etc
>
> HTH
> Mathieu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080925/fdceae87/attachment-0001.html>


More information about the Python-list mailing list