summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d59dae6ad784f0b5ee68e95fc1ec9203a34514b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer: Ianis Vasilev <ianis@ivasilev.net>
pkgname=python-pytest-image-diff
_pkgbasename=${pkgname:7}
pkgver=0.0.11
pkgrel=2
pkgdesc='pytest helps for compare images and regression'
arch=(any)
url="https://pypi.org/project/${_pkgbasename}/"
license=(MIT)
depends=(python python-diffimg python-imgdiff)
makedepends=(python-setuptools python-build python-installer python-wheel)
source=("https://pypi.io/packages/source/${_pkgbasename:0:1}/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz")
sha256sums=('50443ee1ad3cb5fa2d0b6cfc2d21a70eff8666a4d447e1f55e3e73f7b94413d9')
arch=(any)

_fullsrcdir() {
    echo "${srcdir}/${_pkgbasename}-${pkgver}"
}

build() {
    cd "$(_fullsrcdir)"
    python -m build --wheel --no-isolation
}

package() {
    cd "$(_fullsrcdir)"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}