diff options
author | Max Rees <maxcrees@me.com> | 2018-01-09 07:52:45 +0000 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2018-01-11 04:21:20 +0000 |
commit | 8755678b2d014432a702f370b7382d8e714834a3 (patch) | |
tree | c13e35200891239a92d46eb03380d90c4fcc80f3 /user/py3-pillow | |
parent | cee386a7d341f6ad530f58bd7ec2785b935cda79 (diff) | |
download | packages-8755678b2d014432a702f370b7382d8e714834a3.tar.gz packages-8755678b2d014432a702f370b7382d8e714834a3.tar.bz2 packages-8755678b2d014432a702f370b7382d8e714834a3.tar.xz packages-8755678b2d014432a702f370b7382d8e714834a3.zip |
user/py3-pillow: new package
Diffstat (limited to 'user/py3-pillow')
-rw-r--r-- | user/py3-pillow/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/user/py3-pillow/APKBUILD b/user/py3-pillow/APKBUILD new file mode 100644 index 000000000..c995de7f5 --- /dev/null +++ b/user/py3-pillow/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Max Rees <maxcrees@me.com> +# Maintainer: Max Rees <maxcrees@me.com> +pkgname=py3-pillow +_pkgname=Pillow +pkgver=5.0.0 +pkgrel=0 +pkgdesc="A Python Imaging Library" +url="https://pypi.python.org/pypi/Pillow/$pkgver" +arch="all" +license="Custom" +depends="py3-olefile python3" +makedepends="python3-dev py3-setuptools freetype-dev jpeg-dev libwebp-dev + tiff-dev libpng-dev lcms2-dev openjpeg-dev zlib-dev" +subpackages="$pkgname-doc" +_scripts_rev="f578e2c" +source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + $pkgname-scripts-$_scripts_rev.tar.gz::https://github.com/python-pillow/pillow-scripts/archive/$_scripts_rev.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +unpack() { + default_unpack + mv pillow-scripts-*/Scripts "$builddir/Scripts" +} + +build() { + cd "$builddir" + # zlib resides in lib + export CFLAGS="$CFLAGS -L/lib" + python3 setup.py build +} + +check() { + cd "$builddir" + PYTHONPATH="$(find 'build' -name 'lib.*')" python3 selftest.py +} + +package() { + cd "$builddir" + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +doc() { + pkgdesc="Example scripts for $pkgname" + depends="$pkgname" + + cd "$builddir" + local destdir="$subpkgdir/usr/share/doc/$pkgname" + install -d "$destdir"/Scripts + install -m 644 Scripts/* "$destdir"/Scripts/ + install -Dm644 LICENSE "$subpkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +sha512sums="f6f1e138effe44a89897f48032a36406dab3c4ddff2a97b7d01e99c05865abad5cffa3ab0eefcacb243e422778063b49243b1a538012fe9c39a1e4329c0978f3 py3-pillow-5.0.0.tar.gz +1a2e6dc45127b3f0b706d5be4fdc8ddeb09a9e046a182eb48239572e1bdc62d1b1f1a1f11ef1f1f23766aaac1b498556cc9a9cf11d3b943c9f2834c9b41612e0 py3-pillow-scripts-f578e2c.tar.gz" |