aur/python2-pillow/PKGBUILD
2021-05-19 11:10:01 +02:00

46 lines
1.4 KiB
Bash

# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: minder
pkgname=python2-pillow
pkgver=6.2.2
pkgrel=1
_appname=Pillow
_py2basever=2.7
pkgdesc="Python Imaging Library (PIL) fork."
arch=('x86_64')
url="https://python-pillow.github.io/"
license=('BSD')
provides=('python2-imaging')
conflicts=('python2-imaging')
depends=('python2' 'freetype2' 'lcms2' 'libraqm' 'libtiff' 'openjpeg2' 'libimagequant' 'libxcb')
optdepends=('libwebp: for webp images'
'tk: for the ImageTK module'
'python-olefile: OLE2 file support'
'python-pyqt5: for the ImageQt module')
makedepends=('python2-setuptools' 'libwebp' 'tk')
checkdepends=('python2-pytest')
source=("https://files.pythonhosted.org/packages/source/P/$_appname/$_appname-$pkgver.tar.gz")
sha256sums=('db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950')
build() {
cd "$srcdir/$_appname-$pkgver"
python2 setup.py build
}
check() {
cd "$srcdir/$_appname-$pkgver"
export PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_py2basever"
python2 selftest.py
pytest2 || true
}
package() {
cd "$srcdir/$_appname-$pkgver"
python2 setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -dm755 "$pkgdir/usr/include/python$_py2basever/"
install -m644 -t "$pkgdir/usr/include/python$_py2basever/" src/libImaging/*.h
}