Home | Download/Install | Documentation | Packages | Screenshots | News | Forum/Mailing-lists | Contact | GForge

Mac OS X release process

How to create a release package with PackageMaker

Pre-requisite:

  • PackageMaker needs to be installed on your machine.
  • You need to have access to an admin account on your machine and probably to the root account.

Create a Distributions folder which contains the .egg and copy them into it.

Once, it is done, you can now use PackageMaker to create the package.

Enter the information for your package :

Install Properties

  • Organization : INRIA-CIRAD-INRA.fr
  • Minimum Target : Mac OS X v10.5 Leopard

Configuration

  • Title : OpenAlea Release X.X
  • User Sees : Easy Install Only
  • Install Destination : Volume selected by user
  • Description : Installer for OpenAlea release X.X.

Click on “Edit Interface…”

  • Background : click on file and choice OpenAlea logo (openalea_large_notxt.png on the wiki)
  • Readme : OpenAlea is an open source software primarily aimed at the plant research community, with a particular focus on Plant Architecture Modeling at different scales. It provides a visual programming environment and a component software architecture.
  • Licence : select the licence file in openalea_meta

1st package : setuptools

Drop setuptools-0.6c11-py2.6.egg into Contents and enter the information :

Configuration

  • Destination : /Library/OpenAlea/Distributions
  • Package Version : 0.9

Scripts : postinstall script is launched after the files in the package have been installed.

#!/bin/sh
 
cd /System/Library/OpenAlea/Distributions/
easy_install -H None -f . setuptools-0.6c11-py2.6.egg

2nd package : OpenAlea

Re-start with all OpenAlea *.egg

Drop OpenAlea.Deploy-0.9.0-py2.6.egg into Contents and enter the information :

Configuration

  • Destination : /Library/OpenAlea/Distributions
  • Package Version : 0.9

Scripts :

#!/bin/sh
 
cd /System/Library/OpenAlea/Distributions/
for egg in *
do
    easy_install -H None -f . "$egg"
done

In the same way, add the other packages : PyQt4, BoostPython, Numpy, Scipy, Matplotlib

Mac OS X 10.5 release

Before you start, you have to follow the instructions to install QT, PyQT and SIP on mac installation page

FIXME this part is redundant with mac installation page

We will create the Qt eggs. For that, we spilt Qt eggs in two separated packages:

  • A binary egg for users
  • A development egg to deploy a development environment
Qt egg

We create a Qt egg directory which contains:

  • PyQt module copied from /python2.x/site-packages/PyQt
  • qsci module from /python2.x/site-packages/qsci
mkdir qt4
cd qt4
cp -R /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/PyQt .
cp -R /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/qsci .
 
cp -R /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/sip* .
 
cp -R /usr/local/Trolltech/Qt-4.x.x/lib/*.dylib PyQt/.

The Qsci.so refers to the dynamic lib qscintilla2. But the reference is absolute rather than relative. To fix this problem, the path has to be modified with the install-name-tool command:

install_name_tool -change /usr/local/Trolltech/Qt-4.5.2/lib/libqscintilla2.5.dylib libqscintilla2.5.dylib Qsci.so  
Qt-dev egg

Qt-dev egg contains:

  • bin:
    • Qt4 bin in /usr/local/Trolltech/Qt-4.x.x/bin
    • PyQt4 bin installed in Python root(pyrcc, pyuic and pylupdate for instance)
  • include:
    • Qt4 include
    • sip include (sip build)
  • lib:
    • Qt lib (*.dylib)
  • sip:
  • PyQt sip (*.sip)
mkdir qt4-dev; cd qt4-dev
 
# Copy binaries
cp -R /usr/local/Trolltech/Qt-4.x.x/bin .
cp /Library/Frameworks/Python.framework/Versions/Current/bin/pyrcc4* bin/.
cp /Library/Frameworks/Python.framework/Versions/Current/bin/pyuic4* bin/.
cp /Library/Frameworks/Python.framework/Versions/Current/bin/pylupdate4* bin/.
cp /Library/Frameworks/Python.framework/Versions/Current/bin/sip bin/.
 
# Copy includes
cp -R /usr/local/Trolltech/Qt-4.x.x/include .
cp /Library/Frameworks/Python.framework/Versions/Current/include/python2.6/sip.h include/.
 
# Copy lib
cp -R /usr/local/Trolltech/Qt-4.x.x/lib .
 
# Copy sip
cp -R /Library/Frameworks/Python.framework/Versions/Current/share/sip .

Finally, we create the Qt egg packages with a Python scrypt.

You have to build the egg using a setup.py file (TODO) or using this method. If you use mac archive tool to create a zip file, the egg will be corrupted. This is due to the way symbolic links are managed. The egg consider only plain files and will copy the sym links as plain file.

In an other hand, you have to remove the symlink. Other else, the real lib will be copied multiple times.

Build the egg from a build_zip.py file in the installed boost directory (deploy/examples dir)

Boost.Python
  • Get the latest Boost release
  • Install bjam.exe
  • Build boost from source using specific flags
cd boost_x_xx_x
./bootstrap.sh --prefix=../release/boost
./bjam --prefix=../release/boost --with-python link=shared variant=release threading=multi runtime-link=shared install
  • Build the egg from a setup.py file in the installed boost directory (setup_boost.py in deploy/examples dir)
cd release/boost
python setup_boost.py bdist_egg
QHull
  • Get the latest QHull release
cd qhull
./configure --prefix=localpath/qhull
make
make install

All the binaries (bin) refer to the dynamic lib libqhull.5. But the reference is absolute rather than relative. To fix this problem, the path has to be modified with the install-name-tool command:

sudo install_name_tool -change /usr/local/lib/libqhull.5.dylib libqhull.5.dylib qhull 
  • Build the egg from a setup.py file in the installed qhull directory (setup_qhull.py in deploy/examples dir)
python setup_qhull.py bdist_egg
Bisonflex
VPlants

When you execute:

python setup.py install

you can have a error as :

Exception: Qt4 command 'moc' not found. Tried:
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/qt4_dev-4.5.2-py2.6-macosx-10.5-fat.egg/bin/moc-qt4
and /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/qt4_dev-4.5.2-py2.6-macosx-10.5-fat.egg/bin/moc
 
raise Exception("Qt4 command '" + command + "' not found. Tried: " +
fullpath1 + " and "+ fullpath2)
Scons subprocess has failed.  Failure...

That is due to a problem of permission of QT4.egg. To resolve that, you have to change the rights:

sudo chmod 755 /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/qt4_dev-4.5.2-py2.6-macosx-10.5-fat.egg/bin/moc

Mac OS X 10.6 Release

Before you start, you have to follow the instructions to install QT, PyQT and SIP on mac installation page

We will create the Qt eggs. For that, we spilt Qt eggs in two separated packages:

  • A binary egg for users
  • A development egg to deploy a development environment
Qt egg

We create a Qt egg directory which contains:

  • PyQt module copied from /python2.x/site-packages/PyQt
  • qsci module from /python2.x/site-packages/qsci
mkdir qt4
cd qt4
cp -R /Library/Python/2.6/site-packages/sip* .
cp -rf /usr/local/Trolltech/Qt-4.6.0/qsci .
 
cp -rf  /Library/Python/2.6/site-packages/PyQt4 .
 
cd PyQt4
cp -rf /usr/local/Trolltech/Qt-4.x.x/lib/* .

The Qsci.so refers to the dynamic lib qscintilla2. But the reference is absolute rather than relative. To fix this problem, the path has to be modified with the install-name-tool command:

install_name_tool -change /usr/local/Trolltech/Qt-4.5.2/lib/libqscintilla2.5.dylib libqscintilla2.5.dylib Qsci.so  

Create the EGG_INFO directory with :

  • dependency_links.txt
  • lib_dirs.txt
  • native_libs.txt
  • top_level.txt
Qt-dev egg

Qt-dev egg contains:

  • bin:
    • Qt4 bin in /usr/local/Trolltech/Qt-4.x.x/bin
    • PyQt4 bin installed in Python root(pyrcc, pyuic and pylupdate for instance)
  • include:
    • Qt4 include
    • sip include (sip build)
  • lib:
    • Qt lib (*.dylib)
  • sip:
  • PyQt sip (*.sip)
mkdir qt4-dev; cd qt4-dev
 
# Copy binaries
cp -R /usr/local/Trolltech/Qt-4.x.x/bin .
 
 
cp /System/Library/Frameworks/Python.framework/Versions/Current/bin/pyrcc4 ./bin
cp /System/Library/Frameworks/Python.framework/Versions/Current/bin/pyuic4 ./bin
cp /System/Library/Frameworks/Python.framework/Versions/Current/bin/pylupdate4 ./bin
cp /System/Library/Frameworks/Python.framework/Versions/Current/bin/sip ./bin
 
# Copy includes
cp -R /usr/local/Trolltech/Qt-4.x.x/include .
 
mkdir ./include/sip
cp /System/Library/Frameworks/Python.framework/Versions/Current/include/python2.6/sip.h ./include/sip/
 
# Copy lib
cp -R /usr/local/Trolltech/Qt-4.x.x/lib .
 
# Copy sip
cp -R /System/Library/Frameworks/Python.framework/Versions/Current/share/sip .

Create the EGG_INFO directory with :

  • dependency_links.txt
  • lib_dirs.txt
  • native_libs.txt
  • top_level.txt

Finally, we create the Qt egg packages with a Python script.

You have to build the egg using a setup.py file (TODO) or using this method. If you use mac archive tool to create a zip file, the egg will be corrupted. This is due to the way symbolic links are managed. The egg consider only plain files and will copy the sym links as plain file.

In an other hand, you have to remove the symlink. Other else, the real lib will be copied multiple times.

Build the egg from a build_zip.py file in the installed boost directory (deploy/examples dir)

Boost.Python
QHull
 
documentation/developper/release/macosx.txt · Last modified: 2014/02/03 09:31 by user   Back to top
INRIA   INRA     CIRAD     AGROPOLIS IBC
INRIA GForge RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki