summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89c06fa9463342a8e83bf77e07fe8f2c7d2f1302 (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
30
31
32
33
34
35
36
37
38
# Maintainer: Henry-ZHR <henry-zhr@qq.com>
pkgname=python-imgcompare
pkgver=2.0.1
pkgrel=1
pkgdesc='Compares two images for equality or a difference percentage'
arch=('any')
url='https://github.com/datenhahn/imgcompare'
license=('MIT')
depends=('python'
         'python-pillow')
makedepends=('git'
             'python-build'
             'python-installer'
             'python-wheel')
_tag='959cc9864b0b62a4388d77289056ad58be70b099'
source=("${pkgname}::git+${url}.git#tag=${_tag}")
sha512sums=('SKIP')

pkgver() {
  cd "${pkgname}"
  git describe --tags
}

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

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

check() {
  cd "${pkgname}"
  python -m unittest discover -v
}