By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,865 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,865 IT Pros & Developers. It's quick & easy.

Re: how to build a MacOS universal python package including externaldependencies

P: n/a
2008/9/24 Jaime Huerta Cepas <jh*****@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
Sep 24 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.