summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorKyle Manna2023-07-29 12:47:53 -0500
committerKyle Manna2023-07-29 12:47:53 -0500
commit9f380504777be3cf008ed88e6cad43c7589c1672 (patch)
treeadd7b8ec7ec06fff5dd1200694dfd105a8efe0ab /PKGBUILD
parent3ad8f234f317515297de7c0aa0cd73d940449c39 (diff)
downloadaur-python-affine.tar.gz
release: affine v2.4.0-1
* Follow upstream. * Update to use modern python packaging.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD23
1 files changed, 17 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1f968d28c502..fc5b37a0d665 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,35 @@
# Maintainer: Kyle Manna <kyle[at]kylemanna[d0t]com>
_pkgname=affine
pkgname=python-${_pkgname}
-pkgver=2.3.1
+pkgver=2.4.0
pkgrel=1
pkgdesc="Python package for matrices describing affine transformation of the plane"
-url="https://github.com/sgillies/affine"
-makedepends=('python-setuptools')
+url='https://github.com/rasterio/affine'
+makedepends=('python-build'
+ 'python-installer'
+ 'python-wheel'
+ 'python-flit-core'
+ )
depends=('python')
optdepends=()
license=('BSD')
arch=('any')
source=("https://pypi.python.org/packages/source/a/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
-sha256sums=('d676de66157ad6af99ffd94e0f54e89dfc35b0fb7252ead2ed0ad2dca431bdd0')
+sha256sums=('a24d818d6a836c131976d22f8c27b8d3ca32d0af64c1d8d29deb7bafa4da1eea')
build() {
cd "$srcdir/${_pkgname}-$pkgver"
- python setup.py build
+ python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/${_pkgname}-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
+
+ # https://wiki.archlinux.org/index.php/Python_package_guidelines
+ local site_packages=$(python -c 'import site; print(site.getsitepackages()[0])')
+ rm -rf "${pkgdir}${site_packages}/test"
}