summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLuis Martinez2022-06-26 12:59:52 -0500
committerLuis Martinez2022-06-26 12:59:52 -0500
commitc338eb0dd4478378a9e995222e0b50e2738ccc92 (patch)
tree419d2c5576bfd10ec19bed60870510c6abecd846 /PKGBUILD
parente0c057a55a28ca06cfe7550ede2dae52f483bf13 (diff)
downloadaur-python-pypinfo.tar.gz
update to 21.0.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD26
1 files changed, 16 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e632fe115a50..19705d2df71c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,15 @@
# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com>
pkgname=python-pypinfo
-pkgver=20.0.0
+_pkg="${pkgname#python-}"
+pkgver=21.0.0
pkgrel=1
pkgdesc="View PyPI download statistics with ease"
arch=('any')
url="https://github.com/ofek/pypinfo"
license=('MIT')
depends=(
- 'python>=3.6'
+ 'python>=3.7'
'python-binary'
'python-click'
'python-google-cloud-bigquery'
@@ -17,18 +18,23 @@ depends=(
'python-platformdirs'
'python-tinydb'
'python-tinyrecord')
-makedepends=('python-setuptools')
-source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/pypinfo/pypinfo-$pkgver.tar.gz")
-sha256sums=('770bbafda03eb231929ef6e245bf75c09b260bbd5fcdf54a8cc446aa2b2d2d0e')
+makedepends=('python-build' 'python-hatchling' 'python-installer' 'python-wheel')
+changelog=CHANGELOG.rst
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkg::1}/$_pkg/$_pkg-$pkgver.tar.gz")
+sha256sums=('4a500a989977de2f2ea2b05e4d84a5a0caef7d43dffbe40ab581cbf60cc78293')
build() {
- cd "pypinfo-$pkgver"
- python setup.py build
+ cd "$_pkg-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd "pypinfo-$pkgver"
- PYTHONHASHSEED=0 python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ cd "$_pkg-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
install -Dm644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
- install -Dm644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s \
+ "$_site/$_pkg-$pkgver.dist-info/license_files/LICENSE.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}