wok-undigest 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 | e549186a3cd3 |
children | fe65d1f71c17 |
files | python/.icon.png python/receipt python/stuff/applications/python-idle.desktop python/stuff/applications/python.desktop python/stuff/patches/13a39142c047.diff python/stuff/patches/series python/stuff/python.png python3/.icon.png python3/receipt |
line diff
1.1 Binary file python/.icon.png has changed
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/python/receipt Fri Nov 15 17:47:30 2019 +0100 2.3 @@ -0,0 +1,71 @@ 2.4 +# SliTaz package receipt v2. 2.5 + 2.6 +PACKAGE="python" 2.7 +VERSION="2.7.15" 2.8 +CATEGORY="development" 2.9 +SHORT_DESC="The Python programming language" 2.10 +MAINTAINER="devel@slitaz.org" 2.11 +LICENSE="PSL" 2.12 +WEB_SITE="https://www.python.org/" 2.13 +LFS="http://www.linuxfromscratch.org/blfs/view/svn/general/python2.html" 2.14 +REPOLOGY="python2" 2.15 + 2.16 +TARBALL="$PACKAGE-$VERSION.tar.xz" 2.17 +WGET_URL="https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz" 2.18 +TARBALL_SHA1="f99348a095ec4a6411c84c0d15343d11920c9724" 2.19 + 2.20 +BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev sqlite3-dev zlib-dev \ 2.21 +ncurses-dev tcl-dev tk-dev db-dev gdbm-dev libffi-dev expat-dev" 2.22 +SPLIT="$PACKAGE-dev $PACKAGE-idle $PACKAGE-tcltk $PACKAGE" 2.23 + 2.24 +COOKOPTS="!menus !zip" 2.25 + 2.26 +compile_rules() { 2.27 + # Temporary workaround for FS#22322 2.28 + # See http://bugs.python.org/issue10835 for upstream report 2.29 + sed -i.orig "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c 2.30 + 2.31 + # Enable built-in SQLite3 module to load extensions (fix FS#22122) 2.32 + sed -i.orig "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py 2.33 + 2.34 + ./configure \ 2.35 + --prefix=/usr \ 2.36 + --enable-shared \ 2.37 + --with-system-expat \ 2.38 + --with-system-ffi \ 2.39 + --without-ensurepip \ 2.40 + --enable-unicode=ucs4 \ 2.41 + $CONFIGURE_ARGS && 2.42 + make && 2.43 + make DESTDIR=$install install && 2.44 + chmod -v 755 $install/usr/lib/libpython2.7.so.1.0 2.45 + 2.46 + find $install -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete 2.47 +} 2.48 + 2.49 +genpkg_rules() { 2.50 + case $PACKAGE in 2.51 + *-dev) 2.52 + copy @dev test/ distutils/command/*.exe ensurepip/ 2.53 + find $fs -type f -name pyconfig.h -delete # move to python package 2.54 + DEPENDS="python" # skip python-idle and python-tcltk 2.55 + ;; 2.56 + *-idle) 2.57 + copy idle idlelib/ python-idle.desktop 2.58 + CAT="development|GUI IDE using TK Toolkit" 2.59 + DEPENDS="python-tcltk tcl tk" 2.60 + ;; 2.61 + *-tcltk) 2.62 + copy _tkinter.so lib-tk/ @rm 2.63 + CAT="development|Tcl/Tk files" 2.64 + DEPENDS="python tcl tk libx11" 2.65 + ;; 2.66 + python) 2.67 + # Now pyconfig.h is required for Mercurial. 2.68 + copy @std @rm pyconfig.h 2.69 + DEPENDS="python-setuptools python-pip \ 2.70 + libbzip2 expat libgdbm libffi libsqlite3 ncurses \ 2.71 + ncurses-libpanel openssl readline zlib" 2.72 + ;; 2.73 + esac 2.74 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/python/stuff/applications/python-idle.desktop Fri Nov 15 17:47:30 2019 +0100 3.3 @@ -0,0 +1,6 @@ 3.4 +[Desktop Entry] 3.5 +Type=Application 3.6 +Name=Python IDLE 3.7 +Exec=idle 3.8 +Icon=python 3.9 +Categories=Development;
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/python/stuff/applications/python.desktop Fri Nov 15 17:47:30 2019 +0100 4.3 @@ -0,0 +1,12 @@ 4.4 +[Desktop Entry] 4.5 +Encoding=UTF-8 4.6 +Name=Python interpreter 4.7 +Name[fr]=Interpreteur Python 4.8 +Name[pt]=Interpretador Python 4.9 +Name[pt_BR]=Interpretador Python 4.10 +Name[ru]=Интерпретатор Python 4.11 +Terminal=false 4.12 +Exec=terminal -e python 4.13 +Icon=python 4.14 +Type=Application 4.15 +Categories=Development;
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/python/stuff/patches/13a39142c047.diff Fri Nov 15 17:47:30 2019 +0100 5.3 @@ -0,0 +1,72 @@ 5.4 +Error in the end of the `make install`: 5.5 + 5.6 +``` 5.7 +Traceback (most recent call last): 5.8 + File "${src}/Lib/runpy.py", line 163, in _run_module_as_main 5.9 + mod_name, _Error) 5.10 + File "${src}/Lib/runpy.py", line 111, in _get_module_details 5.11 + __import__(mod_name) # Do not catch exceptions initializing package 5.12 + File "${src}/Lib/ensurepip/__init__.py", line 9, in <module> 5.13 + import tempfile 5.14 + File "${src}/Lib/tempfile.py", line 35, in <module> 5.15 + from random import Random as _Random 5.16 + File "${src}/Lib/random.py", line 885, in <module> 5.17 + _inst = Random() 5.18 + File "${src}/Lib/random.py", line 97, in __init__ 5.19 + self.seed(x) 5.20 + File "${src}/Lib/random.py", line 113, in seed 5.21 + a = long(_hexlify(_urandom(2500)), 16) 5.22 +OSError: [Errno 38] Function not implemented 5.23 +make: *** [Makefile:927: install] Error 1 5.24 +``` 5.25 + 5.26 +While the normal installing process is following: 5.27 + 5.28 +``` 5.29 +Collecting setuptools 5.30 +Collecting pip 5.31 +Installing collected packages: setuptools, pip 5.32 +Successfully installed pip-9.0.1 setuptools-28.8.0 5.33 +``` 5.34 + 5.35 +Discussion found here: http://bugs.python.org/issue29188 5.36 +Patch found in the discussion above: 5.37 +https://hg.python.org/cpython/rev/13a39142c047 5.38 + 5.39 +Chunk #1 is removed from the original patch because it rejected. 5.40 + 5.41 + 5.42 +# HG changeset patch 5.43 +# User Victor Stinner <victor.stinner@gmail.com> 5.44 +# Date 1483956641 -3600 5.45 +# Node ID 13a39142c0473ecb64fcd4b12a915025df6e4310 5.46 +# Parent cb4f73be9486d47f1dc4285998d1532d8857c59e 5.47 +Don't use getentropy() on Linux 5.48 + 5.49 +Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but 5.50 +read from /dev/urandom to get random bytes, for example in os.urandom(). On 5.51 +Linux, getentropy() is implemented which getrandom() is blocking mode, whereas 5.52 +os.urandom() should not block. 5.53 + 5.54 +diff --git a/Python/random.c b/Python/random.c 5.55 +--- a/Python/random.c 5.56 ++++ b/Python/random.c 5.57 +@@ -97,8 +97,15 @@ win32_urandom(unsigned char *buffer, Py_ 5.58 + } 5.59 + 5.60 + /* Issue #25003: Don't use getentropy() on Solaris (available since 5.61 +- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */ 5.62 +-#elif defined(HAVE_GETENTROPY) && !defined(sun) 5.63 ++ Solaris 11.3), it is blocking whereas os.urandom() should not block. 5.64 ++ 5.65 ++ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24 5.66 ++ implements it with the getrandom() syscall which can fail with ENOSYS, 5.67 ++ and this error is not supported in py_getentropy() and getrandom() is called 5.68 ++ with flags=0 which blocks until system urandom is initialized, which is not 5.69 ++ the desired behaviour to seed the Python hash secret nor for os.urandom(): 5.70 ++ see the PEP 524 which was only implemented in Python 3.6. */ 5.71 ++#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux) 5.72 + #define PY_GETENTROPY 1 5.73 + 5.74 + /* Fill buffer with size pseudo-random bytes generated by getentropy(). 5.75 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/python/stuff/patches/series Fri Nov 15 17:47:30 2019 +0100 6.3 @@ -0,0 +1,1 @@ 6.4 +#13a39142c047.diff
7.1 Binary file python/stuff/python.png has changed
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/python3/.icon.png Fri Nov 15 17:47:30 2019 +0100 8.3 @@ -0,0 +1,1 @@ 8.4 +../python/.icon.png 8.5 \ No newline at end of file
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/python3/receipt Fri Nov 15 17:47:30 2019 +0100 9.3 @@ -0,0 +1,59 @@ 9.4 +# SliTaz package receipt v2. 9.5 + 9.6 +PACKAGE="python3" 9.7 +VERSION="3.7.2" 9.8 +CATEGORY="development" 9.9 +SHORT_DESC="The Python 3 programming language" 9.10 +MAINTAINER="pascal.bellard@slitaz.org" 9.11 +LICENSE="GPL" 9.12 +WEB_SITE="https://www.python.org/download/releases/" 9.13 +LFS="http://www.linuxfromscratch.org/lfs/view/development/chapter06/Python.html" 9.14 + 9.15 +TARBALL="Python-$VERSION.tar.xz" 9.16 +WGET_URL="https://www.python.org/ftp/python/$VERSION/$TARBALL" 9.17 +TARBALL_SHA1="c3dc6928516bcb934cf4740461044c79c7c35494" 9.18 + 9.19 +BUILD_DEPENDS="readline-dev gdbm-dev openssl-dev sqlite3-dev zlib-dev tk-dev \ 9.20 +ncurses-dev xz-dev bzip2-dev expat-dev libffi-dev" 9.21 +SPLIT="$PACKAGE-idle $PACKAGE-tcltk $PACKAGE-ensurepip $PACKAGE $PACKAGE-dev" 9.22 + 9.23 +COPY_idle="idle3 idle${VERSION%.*} idlelib/" 9.24 +COPY_tcltk="_tkinter.*.so tkinter/" 9.25 +COPY_ensurepip="ensurepip/" 9.26 +COPY_std="@std @rm pyconfig.h" 9.27 + 9.28 +CAT_idle="development|GUI IDE using TK Toolkit" 9.29 +CAT_tcltk="development|Tcl/Tk files" 9.30 +CAT_ensurepip="development|ensurepip" 9.31 + 9.32 +DEPENDS_idle="$PACKAGE" 9.33 +DEPENDS_tcltk="$PACKAGE tcl tk" 9.34 +DEPENDS_ensurepip="$PACKAGE" 9.35 +DEPENDS_std="expat libbzip2 libffi libgdbm liblzma libsqlite3 ncurses \ 9.36 +ncurses-libpanel openssl readline util-linux-uuid zlib python3-setuptools \ 9.37 +python3-pip" 9.38 +DEPENDS_dev="$PACKAGE" 9.39 + 9.40 +TAGS_std="LFS" 9.41 +COOKOPTS="!zip" 9.42 + 9.43 +compile_rules() { 9.44 + mkdir -p $install/usr/lib/pkgconfig 9.45 + 9.46 + ./configure \ 9.47 + --enable-shared \ 9.48 + --with-system-expat \ 9.49 + --with-system-ffi \ 9.50 + --without-ensurepip \ 9.51 + $CONFIGURE_ARGS && 9.52 + make && 9.53 + make DESTDIR=$install install || return 1 9.54 + 9.55 + chmod 755 $install/usr/lib/libpython${VERSION%.*}m.so 9.56 + chmod 755 $install/usr/lib/libpython${VERSION%%.*}.so 9.57 + 9.58 + find $install -type f -name '*.pyc' -delete 9.59 +} 9.60 + 9.61 +PROVIDE_std="py3k" 9.62 +PROVIDE_dev="py3k-dev"