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

Specific Procedure to create eggs

Qt4 egg creation

QT, PyQt and SIP

We spilt Qt eggs in two separated packages:

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

Qt egg contains:

  • PyQt module (*.pyd)
  • Qt dll copied from Qt\bin
  • QScintilla2 python module
  • sip.pyd and config for sip and pyqt

All the debug dll (*4d.dll) have been removed.

from openalea.core.path import path
 
d=path('.')
for debug in d.walkfiles('*d4.dll'):
  debug.remove() 

Some other libs ended with 'd.dll' have been also removed.

Two Python files has to be modified to take into account the new paths:

  • scipconfig.py (installed in site-packages)
  • pyqtconfig.py (in PyQt4)

They specify configuration path which are used by sip to create Python extensions.

Qt4-dev egg contains:

  • bin:
    • Qt4 bin
    • PyQt4 bin installed in Python root(pyrcc.exe, pyuic and pylupdate for instance)
  • include:
    • QT4 include
    • sip include (sip build)
    • Qsci include (QScintilla/Qt4 install)
  • src: QT4 src
include depends on src directory. We have to clean the src dir. Remove the 3rdparty sub-directories except phonon and webkit. In Webkit, we need only the WebCore dir (empty) and the full WebKit one.
  • lib: Qt4 lib (*.a) + lib qscintilla2

Remove all debug libraries (*d4.a)

  • sip:
    • PyQt4 sip
    • QScintilla sip

PyQGLViewer 2.3.4 (sept 2009)

Under Linux

Note that under ubuntu, dos2unix is available within tofrodos package, which can be installed with apt-get.

# Script to automatically dowmload QGL and PYQGL, compile and create eggs for PyQGLViewer
# Sept 2009
# AUTHOR: Thomas Cokelaer
#
# todo: add libplugindesigner in a neat way (at the good location)
# requiers: dos2unix and patch. under ubuntu, dos2unix is provided by the tofrodos package
# hints from this page http://pyqglviewer.gforge.inria.fr/wiki/doku.php?id=documentation
 
# prerequisities
easy_install PyOpenGL
 
# aliases
PYQGL=PyQGLViewer-0.8
OldVersion=2.3.1
NewVersion=2.3.4
QGLold=libQGLViewer-${OldVersion}
QGL=libQGLViewer-${NewVersion}
 
# Get source files from http://www.libqglviewer.com/download.html or http://www.libqglviewer.com/src/
wget http://gforge.inria.fr/frs/download.php/23388/${PYQGL}.zip
wget http://www.libqglviewer.com/src/${QGL}.tar.gz
tar xvfz ${QGL}.tar.gz
rm ${QGL}.tar.gz
unzip ${PYQGL}.zip
rm ${PYQGL}.zip
 
 
#Patch exists for 2.3.1 only,so we need to fix it:
dos2unix ./${PYQGL}.0/src/${QGL}-py.patch
 
 
cd ${QGL}
patch -p 0 -i ../${PYQGL}.0/src/${QGL}-py.patch
 
cd QGLViewer/
qmake-qt4 QGLViewer.pro
############# linux warnings hack for valid eggs under linux #############
sed -i -e 's/LFLAGS        = -Wl,-O1 -shared -Wl,-soname,libQGLViewer.so.2/LFLAGS = -Wl,-O1 -shared -Wl,-soname,libQGLViewer.so/g' Makefile
make
#sudo make install 
cd ../designerPlugin
qmake-qt4 designerPlugin.pro
make
 
 
cd ../../${PYQGL}.0
 
# create some directories
mkdir lib
mkdir include
mkdir include/VRender
 
# copy include and lib from QGLViewer
cp ../${QGL}/QGLViewer/*.h ./include
cp ../${QGL}/QGLViewer/VRender/*.h ./include/VRender
cp ../${QGL}/QGLViewer/lib*.so ./lib
 
python configure.py -Q ../${QGL}
############# linux warnings hack for valid eggs under linux #############
sed -i -e '/MOC/ a  LFLAGS=-shared -Wl,-O1  -Wl,--version-script=PyQGLViewer.exp' ./build/Makefile
make
 
# and possibly sudo make install

For admistrative usage only (to create the egg and uploading):

 
# copy include and lib from QGLViewer plugin
 
# copy PyQGL lib
cp build/PyQGLViewer.so ./lib
 
wget --no-check-certificate https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/*checkout*/trunk/deploy/example/setup_pyqglviewer.py?root=openalea -O setup2.py
 
python setup2.py install
python setup2.py sdist
python setup2.py bdist_egg

mac_logo.jpg

Under Mac

Prerequisite: dos2unix, patch and wget tools that can be installed using fink.

fink install dos2unix
fink install patch
fink install wget

Follow the Script under Linux with some exceptions:

  • Begin directly to create the aliases
  • Then get the source files
  • Use the patch
  • In libQGLViewer, edit QGLViewer.pro:

QGLViewer.pro is configured to generate the libraries in a library bundle. To disable this, we need to replace lib_bundle by lib in the CONFIG line.

#		--  M a c O S X  --
macx|darwin-g++ {
  # CONFIG *= lib_bundle
  CONFIG *= lib 
  • Configure and build the packages
  • And continue the linux procedure
To check that the library is correctly compiled: cd lib, ipython; import PyQGLViewer
 
documentation/core/egg_creation.txt · Last modified: 2010/08/13 11:24 by admin   Back to top
INRIA   INRA     CIRAD     AGROPOLIS
INRIA GForge RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki