diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-11-11 19:27:03 +0700 |
|---|---|---|
| committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2025-11-11 20:26:48 +0700 |
| commit | fbc5879de8a4446c8bf7be847425e768ce4cff45 (patch) | |
| tree | 5d9d6516efc07848d300934f28d9d7ed2683abd3 /python | |
| parent | 047f6fc278fce5b406d23ff5985b3f40a1168917 (diff) | |
python/python3-pillow-opt: Added (PIL Library).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/python3-pillow-opt/README | 23 | ||||
| -rw-r--r-- | python/python3-pillow-opt/python3-pillow-opt.SlackBuild | 70 | ||||
| -rw-r--r-- | python/python3-pillow-opt/python3-pillow-opt.info | 10 | ||||
| -rw-r--r-- | python/python3-pillow-opt/slack-desc | 19 |
4 files changed, 122 insertions, 0 deletions
diff --git a/python/python3-pillow-opt/README b/python/python3-pillow-opt/README new file mode 100644 index 0000000000..f744f6a613 --- /dev/null +++ b/python/python3-pillow-opt/README @@ -0,0 +1,23 @@ +python3-pillow-opt (Python Imaging Library, new version) + +The Python Imaging Library (PIL) adds image processing capabilities +to your Python environment. This library provides extensive file +format support, an efficient internal representation, and powerful +image processing capabilities. + +This version of pillow installs to /opt/python3.9/, so it won't +conflict with Slackware's older python-pillow package. This is the +newest version of pillow that will work with Python 3.9 (please don't +ask for an update to >= 12.0.0). + +Any SlackBuild for a python3 program that requires this version of +pillow will have to modify the python script itself. Add the following +code: + +import sys +sys.path.insert(0,'/opt/python3.9/site-packages') + +If there's already an 'import sys', just put the insert() line right +after it. + +Note: the API documentation is not installed as part of the package. diff --git a/python/python3-pillow-opt/python3-pillow-opt.SlackBuild b/python/python3-pillow-opt/python3-pillow-opt.SlackBuild new file mode 100644 index 0000000000..e459ca4063 --- /dev/null +++ b/python/python3-pillow-opt/python3-pillow-opt.SlackBuild @@ -0,0 +1,70 @@ +#!/bin/bash + +# Slackware build script for python3-pillow-opt + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python3-pillow-opt +SRCNAM=pillow +VERSION=${VERSION:-11.3.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find . ! -type l -a \ + \( -perm /111 -a ! -perm 755 -a -exec chmod -f 755 {} + \) -o \ + \( ! -perm /111 -a ! -perm 644 -a -exec chmod -f 644 {} + \) + +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +PYDIR=/opt/python$PYVER +export PYTHONPATH=$PYDIR/site-packages +python3 -m build --wheel --no-isolation +python3 -m installer --prefix $PYDIR --destdir "$PKG" dist/*.whl + +# --prefix doesn't quite do what I want, fourtysixandtwo says there's no +# 'installer' option explicitly set the site-packages dir, and that +# moving stuff after the fact is the best solution so far. +mv $PKG/$PYDIR/lib*/python3*/site-packages $PKG/$PYDIR +rm -rf $PKG/$PYDIR/lib* +strip $PKG/$PYDIR/site-packages/PIL/* &> /dev/null || true + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a LICENSE *.rst *.md $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python/python3-pillow-opt/python3-pillow-opt.info b/python/python3-pillow-opt/python3-pillow-opt.info new file mode 100644 index 0000000000..0cdf7fa637 --- /dev/null +++ b/python/python3-pillow-opt/python3-pillow-opt.info @@ -0,0 +1,10 @@ +PRGNAM="python3-pillow-opt" +VERSION="11.3.0" +HOMEPAGE="https://pypi.org/project/pillow/" +DOWNLOAD="https://files.pythonhosted.org/packages/source/p/pillow/pillow-11.3.0.tar.gz" +MD5SUM="9464f92bed3be9c68293cb399ec1ec1a" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python3-setuptools-opt" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/python/python3-pillow-opt/slack-desc b/python/python3-pillow-opt/slack-desc new file mode 100644 index 0000000000..d33a5d36c1 --- /dev/null +++ b/python/python3-pillow-opt/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +python3-pillow-opt: python3-pillow-opt (Python Imaging Library, new version) +python3-pillow-opt: +python3-pillow-opt: The Python Imaging Library (PIL) adds image processing capabilities +python3-pillow-opt: to your Python environment. This library provides extensive file +python3-pillow-opt: format support, an efficient internal representation, and powerful +python3-pillow-opt: image processing capabilities. +python3-pillow-opt: +python3-pillow-opt: This version of pillow installs to /opt/python3.9/, so it won't +python3-pillow-opt: conflict with Slackware's older python-pillow package. +python3-pillow-opt: +python3-pillow-opt: |
