# HG changeset patch # User Pascal Bellard # Date 1286631075 -7200 # Node ID 5921dc28d8c6a60d3943aa36d7af5f4ab4ae1b12 # Parent dede0d1b09f8689de14f957cfe39dacadc83c0d2 remove hard coded python2.5 diff -r dede0d1b09f8 -r 5921dc28d8c6 childsplay/receipt --- a/childsplay/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/childsplay/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -16,9 +16,10 @@ compile_rules() { cd $src + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') sed -i "s|PREFIX = '/usr/local'|PREFIX = '_pkg/usr'|" $src/setup.py sed -i \ -"s|get_python_lib()|'_pkg', 'usr', 'lib', 'python2.5', 'site-packages'|" \ +"s|get_python_lib()|'_pkg', 'usr', 'lib', '$PYTHON_LIB', 'site-packages'|" \ $src/setup.py sed -i "/key/s/raw_input/#raw_input/" $src/setup.py python setup.py install --root=$PWD/_pkg @@ -27,7 +28,7 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - BASEPATHS="$_pkg/usr/lib/python2.5/site-packages/childsplay_sp/SPBasePaths.py" + BASEPATHS="$_pkg/usr/lib/$PYTHON_LIB/site-packages/childsplay_sp/SPBasePaths.py" for file in `find $_pkg | grep 'pyc$'`; do rm $file diff -r dede0d1b09f8 -r 5921dc28d8c6 dbus-python-dev/receipt --- a/dbus-python-dev/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/dbus-python-dev/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -11,9 +11,10 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/lib/python2.5/site-packages + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') + mkdir -p $fs/usr/lib/$PYTHON_LIB/site-packages cp -a $_pkg/usr/lib/python*/*/*.la \ - $fs/usr/lib/python2.5/site-packages + $fs/usr/lib/$PYTHON_LIB/site-packages cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib cp -a $_pkg/usr/include $fs/usr } diff -r dede0d1b09f8 -r 5921dc28d8c6 gcc+gcj/receipt --- a/gcc+gcj/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/gcc+gcj/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -61,6 +61,7 @@ mkdir -p $SOURCE-$VERSION-build cd $SOURCE-$VERSION-build + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') ../$SOURCE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \ --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \ --enable-languages=c,c++,objc,java --enable-shared \ @@ -70,7 +71,7 @@ --enable-java-home --with-arch-directory=i386 \ --with-jvm-root-dir=/usr/lib/jvm/java-gcj \ --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \ - --with-python-dir=/lib/python2.5/site-packages \ + --with-python-dir=/lib/$PYTHON_LIB/site-packages \ --with-x --enable-java-awt=gtk \ --enable-gtk-cairo \ --enable-lto \ diff -r dede0d1b09f8 -r 5921dc28d8c6 gnome-menus-dev/receipt --- a/gnome-menus-dev/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/gnome-menus-dev/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -12,10 +12,11 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/lib/python2.5/site-packages + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') + mkdir -p $fs/usr/lib/$PYTHON_LIB/site-packages cp -a $_pkg/usr/lib/*.*a $fs/usr/lib - cp -a $_pkg/usr/lib/python2.5/site-packages/*.*a \ - $fs/usr/lib/python2.5/site-packages + cp -a $_pkg/usr/lib/$PYTHON_LIB/site-packages/*.*a \ + $fs/usr/lib/$PYTHON_LIB/site-packages cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib cp -a $_pkg/usr/include $fs/usr } diff -r dede0d1b09f8 -r 5921dc28d8c6 gnome-menus/receipt --- a/gnome-menus/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/gnome-menus/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -27,9 +27,10 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr/lib cp -a $_pkg/usr/lib/*.so* $fs/usr/lib - cp -a $_pkg/usr/lib/python2.5 $fs/usr/lib - rm $fs/usr/lib/python2.5/site-packages/*.*a + cp -a $_pkg/usr/lib/$PYTHON_LIB $fs/usr/lib + rm $fs/usr/lib/$PYTHON_LIB/site-packages/*.*a } diff -r dede0d1b09f8 -r 5921dc28d8c6 libxslt-dev/receipt --- a/libxslt-dev/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/libxslt-dev/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -22,7 +22,8 @@ chmod +x $fs/usr/bin/* # Python module - cp -a $_pkg/usr/lib/python2.5 $fs/usr/lib + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') + cp -a $_pkg/usr/lib/$PYTHON_LIB $fs/usr/lib cp -a $_pkg/usr/include $fs/usr cp -a $_pkg/usr/share/aclocal $fs/usr/share diff -r dede0d1b09f8 -r 5921dc28d8c6 pycairo/receipt --- a/pycairo/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/pycairo/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -25,7 +25,8 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr/lib - cp -a $_pkg/usr/lib/python2.5 $fs/usr/lib + cp -a $_pkg/usr/lib/$PYTHON_LIB $fs/usr/lib } diff -r dede0d1b09f8 -r 5921dc28d8c6 pygobject/receipt --- a/pygobject/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/pygobject/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -24,8 +24,9 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr/lib - cp -a $_pkg/usr/lib/python2.5 $fs/usr/lib + cp -a $_pkg/usr/lib/$PYTHON_LIB $fs/usr/lib cp -a $_pkg/usr/lib/*.so* $fs/usr/lib } diff -r dede0d1b09f8 -r 5921dc28d8c6 pygtk/receipt --- a/pygtk/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/pygtk/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -30,6 +30,7 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr/lib - cp -a $_pkg/usr/lib/python2.5 $fs/usr/lib + cp -a $_pkg/usr/lib/$PYTHON_LIB $fs/usr/lib } diff -r dede0d1b09f8 -r 5921dc28d8c6 python-couchdbkit/receipt --- a/python-couchdbkit/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/python-couchdbkit/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -23,13 +23,14 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') _pkg="$SOURCE/_pkg" for file in `find $_pkg | grep 'pyc$'`; do rm $file done mkdir -p $fs/usr - rm -f $_pkg/usr/lib/python2.5/site-packages/tests/* - rmdir $_pkg/usr/lib/python2.5/site-packages/tests + rm -f $_pkg/usr/lib/$PYTHON_LIB/site-packages/tests/* + rmdir $_pkg/usr/lib/$PYTHON_LIB/site-packages/tests cp -a $_pkg/usr $fs } diff -r dede0d1b09f8 -r 5921dc28d8c6 python-pygame/receipt --- a/python-pygame/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/python-pygame/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -26,9 +26,10 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr cp -a $_pkg/usr/lib $fs/usr - chmod 644 $fs/usr/lib/python2.5/site-packages/pygame/freesansbold.ttf + chmod 644 $fs/usr/lib/$PYTHON_LIB/site-packages/pygame/freesansbold.ttf cp -a $_pkg/usr/include $fs/usr } diff -r dede0d1b09f8 -r 5921dc28d8c6 python-restclient/receipt --- a/python-restclient/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/python-restclient/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -23,13 +23,14 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') _pkg="$SOURCE/_pkg" for file in `find $_pkg | grep 'pyc$'`; do rm $file done mkdir -p $fs/usr - rm -f $_pkg/usr/lib/python2.5/site-packages/tests/* - rmdir $_pkg/usr/lib/python2.5/site-packages/tests + rm -f $_pkg/usr/lib/$PYTHON_LIB/site-packages/tests/* + rmdir $_pkg/usr/lib/$PYTHON_LIB/site-packages/tests cp -a $_pkg/usr $fs } diff -r dede0d1b09f8 -r 5921dc28d8c6 python-sqlalchemy/receipt --- a/python-sqlalchemy/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/python-sqlalchemy/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -23,12 +23,13 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') for file in `find $_pkg | grep 'pyc$'`; do rm $file done mkdir -p $fs/usr - rm $_pkg/usr/lib/python2.5/site-packages/sqlalchemy/test/* - rmdir $_pkg/usr/lib/python2.5/site-packages/sqlalchemy/test + rm $_pkg/usr/lib/$PYTHON_LIB/site-packages/sqlalchemy/test/* + rmdir $_pkg/usr/lib/$PYTHON_LIB/site-packages/sqlalchemy/test cp -a $_pkg/usr $fs } diff -r dede0d1b09f8 -r 5921dc28d8c6 python-turbogears/receipt --- a/python-turbogears/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/python-turbogears/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -17,6 +17,7 @@ # Rules to configure and make the package. compile_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') # Tgsetup dont build TurboGearsKid and friends if there are already # installed, so remove python-turbogears before building. if [ -d /var/lib/tazpkg/installed/python-turbogears ]; then @@ -25,7 +26,7 @@ # Use tgsetup.py to bootstrap installation with all deps. It will # build: TurbuGears, TurboCheetah, TurboJson and TurboKid. cd $src/tools - DESTDIR="../_pkg/usr/lib/python2.5/site-packages" + DESTDIR="../_pkg/usr/lib/$PYTHON_LIB/site-packages" mkdir -p $DESTDIR PYTHONPATH=$DESTDIR python tgsetup.py -U -d $DESTDIR --prefix="../_pkg/usr" } @@ -33,6 +34,7 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') cp -a $_pkg/usr $fs - rm $fs/usr/lib/python2.5/site-packages/site.py* + rm $fs/usr/lib/$PYTHON_LIB/site-packages/site.py* } diff -r dede0d1b09f8 -r 5921dc28d8c6 python/receipt --- a/python/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/python/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -33,8 +33,8 @@ strip -s $fs/usr/bin/* 2>/dev/null strip -s $fs/usr/lib/*.so* 2>/dev/null - # Python can be symlink to python2.5 ??? + # Python can be symlink to python${VERSION:0:3} ??? #cd $fs/usr/bin - #rm python && ln -s python2.5 python + #rm python && ln -s python${VERSION:0:3} python } diff -r dede0d1b09f8 -r 5921dc28d8c6 rrdtool-python/receipt --- a/rrdtool-python/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/rrdtool-python/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -12,7 +12,8 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr/lib - cp -a $_pkg/usr/lib/python2.5 $fs/usr/lib + cp -a $_pkg/usr/lib/$PYTHON_LIB $fs/usr/lib } diff -r dede0d1b09f8 -r 5921dc28d8c6 slitaz-mercurial-style/receipt --- a/slitaz-mercurial-style/receipt Sat Oct 09 05:37:43 2010 +0000 +++ b/slitaz-mercurial-style/receipt Sat Oct 09 15:31:15 2010 +0200 @@ -7,11 +7,11 @@ DEPENDS="mercurial" MAINTAINER="pankso@slitaz.org" WEB_SITE="http://www.slitaz.org/" -PYTHON_LIB="python2.5" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + PYTHON_LIB=$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') mkdir -p $fs/usr/lib/$PYTHON_LIB/site-packages/mercurial cp -a stuff/templates $fs/usr/lib/$PYTHON_LIB/site-packages/mercurial chown -R root.root $fs