wok view python-turbogears/receipt @ rev 24427

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 12 11:42:56 2022 +0000 (2022-02-12)
parents 814362194a8d
children 79b956933702
line source
1 # SliTaz package receipt.
3 PACKAGE="python-turbogears"
4 VERSION="1.1.1"
5 CATEGORY="network"
6 SHORT_DESC="Python web application framework."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="MIT"
9 SOURCE="TurboGears"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.turbogears.org/"
12 WGET_URL="http://files.turbogears.org/eggs/$TARBALL"
14 DEPENDS="python psycopg sqlobject python-kid python-cheetah python-cherrypy \
15 python-paste python-pastedeploy python-pastescript python-formencode \
16 python-decoratortools python-extremes python-simplejson python-peak-rules"
17 BUILD_DEPENDS="$DEPENDS python-dev python-setuptools"
19 current_version()
20 {
21 wget -O - https://github.com/TurboGears/tg2/releases 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/tg\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 sed -i -e 's|http://pypi|https://pypi|' -e \
29 's|sys, os|&, ssl\nssl._create_default_https_context = ssl._create_unverified_context|' \
30 tools/tgsetup.py ez_setup.py
31 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
32 # Tgsetup dont build TurboGearsKid and friends if there are already
33 # installed, so remove python-turbogears before building.
34 if [ -d /var/lib/tazpkg/installed/python-turbogears ]; then
35 yes | tazpkg remove python-turbogears
36 fi
37 # Use tgsetup.py to bootstrap installation with all deps. It will
38 # build: TurbuGears, TurboCheetah, TurboJson and TurboKid.
39 cd $src/tools
40 DESTDIR="../_pkg/usr/lib/$PYTHON_LIB/site-packages"
41 mkdir -p $DESTDIR
42 PYTHONPATH=$DESTDIR python tgsetup.py -U -d $DESTDIR --prefix="../_pkg/usr"
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
49 cp -a $install/usr $fs
50 rm $fs/usr/lib/$PYTHON_LIB/site-packages/site.py*
51 }