summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 26 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8f9014cd330f..615fcd37acd7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,38 @@
# Maintainer: peippo <christoph.fink@gmail.com>
-pkgname=python-dhash
-pkgver=1.3
-pkgrel=6
-
-pkgdesc="Python library to calculate the difference hash (perceptual hash) for a given image, useful for detecting duplicates"
+pkgname="python-dhash"
+_name=${pkgname#python-}
+pkgdesc="Calculate the difference hash (perceptual hash) for an image"
url="https://github.com/Jetsetter/dhash"
-license=('MIT')
-arch=('any')
-makedepends=('python-setuptools')
-depends=('python-pillow')
+pkgver=1.4
+pkgrel=1
+
+arch=("any")
+license=("MIT")
+
+makedepends=(
+ python-build
+ python-installer
+ python-setuptools
+ python-wheel
+)
+depends=(
+ "python"
+ "python-pillow"
+)
-_name=${pkgname#python-}
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
-sha256sums=("e6c8cd09d330f1ac44d3c9735d6b2a637d713dcb6b6091e340f91dda2484acb8")
+b2sums=('b2a86fb8d7acb46dc3b6d37ba3d0de78c0cd0fdb387d3b6a948ced747ea07e8152e91cb46d7c6e8e305be6d6c7b96bd668c218069ef9d1e84afa96bb2b851fa1')
build() {
- cd "$srcdir"/${_name}-$pkgver
- python setup.py build
+ cd "${srcdir}"/${_name}-${pkgver}
+ python -m build --wheel --no-isolation
}
package() {
- cd ${_name}-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst
+ cd "${srcdir}/${_name}-${pkgver}"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}