blob: 6f443bf5ff431a3e579e819b6491d07fc8ae42df (
plain) (
tree)
|
|
# Contributor: Max Rees <maxcrees@me.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=py3-pillow
_pkgname=Pillow
pkgver=5.1.0
pkgrel=0
pkgdesc="A Python Imaging Library"
url="https://pypi.python.org/project/Pillow"
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="1e1d5f12054e2f3befa8dafef2551eb75dfefc06944a528638a1686ebc480b52edfc3eaa9964d687816caf003314ad1fc4891d7379cd92e41fbf4b3cbddd1cb9 py3-pillow-5.1.0.tar.gz
1a2e6dc45127b3f0b706d5be4fdc8ddeb09a9e046a182eb48239572e1bdc62d1b1f1a1f11ef1f1f23766aaac1b498556cc9a9cf11d3b943c9f2834c9b41612e0 py3-pillow-scripts-f578e2c.tar.gz"
|