wok-next view python/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents f48456621a9d
children 5669e8b3be70
line source
1 # SliTaz package receipt v2.
3 PACKAGE="python"
4 VERSION="2.7.15"
5 CATEGORY="development"
6 SHORT_DESC="The Python programming language"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="PSL"
9 WEB_SITE="https://www.python.org/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/general/python2.html"
11 REPOLOGY="python2"
13 TARBALL="$PACKAGE-$VERSION.tar.xz"
14 WGET_URL="https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz"
16 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite3-dev zlib-dev \
17 ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev expat-dev"
18 SPLIT="$PACKAGE-dev $PACKAGE-idle $PACKAGE-tcltk $PACKAGE"
19 COOKOPTS="!menus !zip"
21 compile_rules() {
22 # Temporary workaround for FS#22322
23 # See http://bugs.python.org/issue10835 for upstream report
24 sed -i.orig "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
26 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
27 sed -i.orig "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
29 ./configure \
30 --prefix=/usr \
31 --enable-shared \
32 --with-system-expat \
33 --with-system-ffi \
34 --without-ensurepip \
35 --enable-unicode=ucs4 \
36 $CONFIGURE_ARGS &&
37 make &&
38 make DESTDIR=$install install &&
39 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0
41 find $install -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete
42 }
44 genpkg_rules() {
45 case $PACKAGE in
46 *-dev)
47 copy @dev test/ distutils/command/*.exe ensurepip/
48 find $fs -type f -name pyconfig.h -delete # move to python package
49 ;;
50 *-idle)
51 copy idle idlelib/ python-idle.desktop
52 CAT="development|GUI IDE using TK Toolkit"
53 DEPENDS="python-tcltk tcl tk"
54 ;;
55 *-tcltk)
56 copy _tkinter.so lib-tk/ @rm
57 CAT="development|Tcl/Tk files"
58 DEPENDS="python tcl tk xorg-libX11"
59 ;;
60 python)
61 # Now pyconfig.h is required for Mercurial.
62 copy @std @rm pyconfig.h
63 DEPENDS="python-setuptools python-pip \
64 bzlib expat gdbm libffi libsqlite3 ncurses \
65 ncurses-libpanel openssl readline zlib"
66 ;;
67 esac
68 }