wok-undigest view python/receipt @ rev 1226

copied python and python3 recipes from wok-next
author Hans-G?nter Theisgen
date Fri Nov 15 17:47:30 2019 +0100 (2019-11-15)
parents
children
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"
15 TARBALL_SHA1="f99348a095ec4a6411c84c0d15343d11920c9724"
17 BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite3-dev zlib-dev \
18 ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev expat-dev"
19 SPLIT="$PACKAGE-dev $PACKAGE-idle $PACKAGE-tcltk $PACKAGE"
21 COOKOPTS="!menus !zip"
23 compile_rules() {
24 # Temporary workaround for FS#22322
25 # See http://bugs.python.org/issue10835 for upstream report
26 sed -i.orig "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
28 # Enable built-in SQLite3 module to load extensions (fix FS#22122)
29 sed -i.orig "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
31 ./configure \
32 --prefix=/usr \
33 --enable-shared \
34 --with-system-expat \
35 --with-system-ffi \
36 --without-ensurepip \
37 --enable-unicode=ucs4 \
38 $CONFIGURE_ARGS &&
39 make &&
40 make DESTDIR=$install install &&
41 chmod -v 755 $install/usr/lib/libpython2.7.so.1.0
43 find $install -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete
44 }
46 genpkg_rules() {
47 case $PACKAGE in
48 *-dev)
49 copy @dev test/ distutils/command/*.exe ensurepip/
50 find $fs -type f -name pyconfig.h -delete # move to python package
51 DEPENDS="python" # skip python-idle and python-tcltk
52 ;;
53 *-idle)
54 copy idle idlelib/ python-idle.desktop
55 CAT="development|GUI IDE using TK Toolkit"
56 DEPENDS="python-tcltk tcl tk"
57 ;;
58 *-tcltk)
59 copy _tkinter.so lib-tk/ @rm
60 CAT="development|Tcl/Tk files"
61 DEPENDS="python tcl tk libx11"
62 ;;
63 python)
64 # Now pyconfig.h is required for Mercurial.
65 copy @std @rm pyconfig.h
66 DEPENDS="python-setuptools python-pip \
67 libbzip2 expat libgdbm libffi libsqlite3 ncurses \
68 ncurses-libpanel openssl readline zlib"
69 ;;
70 esac
71 }