archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-piexif / trunk / PKGBUILD
blobba07f3f51961ecc8ee92606c8b4b57029bbeb1b9
1 # Maintainer: David Runge <dave@sleepmap.de>
2 _name=Piexif
3 pkgname=python-piexif
4 pkgver=1.1.3
5 pkgrel=8
6 pkgdesc="To simplify exif manipulations with python. Writing, reading, and more"
7 arch=('any')
8 url="https://github.com/hMatoba/Piexif"
9 license=('MIT')
10 depends=('python')
11 makedepends=('python-setuptools')
12 checkdepends=('python-pytest' 'python-pillow' 'libwebp' 'python-sphinx')
13 source=($pkgname-$pkgver.tar.gz::https://github.com/hMatoba/Piexif/archive/$pkgver.tar.gz
14         pillow-7.2.patch)
15 sha512sums=('bae3a51603bf46e9a8170db180a298c70c77537cb405582eb53ade2b29907fbaeeb4d890a124e0a54de53077b7631c007be088c690f81fb3eda1cd3ccb1ca0d2'
16             'be1ee541e3bb6c219d6fd9ab68e9143c2131f695a2001d36a0d63b0566d71a542a09d58dc0bcbdb8c1353297156ea7853d483b9a44407cb31c30acc4252310bf')
18 prepare() {
19   cd "${_name}-${pkgver}"
21   # https://github.com/hMatoba/Piexif/issues/108
22   patch -Np1 -i ../pillow-7.2.patch
25 build() {
26   cd "${_name}-${pkgver}"
27   python setup.py build
30 check() {
31   cd "${_name}-${pkgver}"
32   export PYTHONPATH="build:${PYTHONPATH}"
33   py.test
36 package() {
37   cd "${_name}-${pkgver}"
38   python setup.py install --skip-build \
39     --optimize=1 \
40     --prefix=/usr \
41     --root="${pkgdir}"
42   install -vDm 644 LICENSE.txt \
43     "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
44   install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"