* update python-platformdirs to 4.2.2-1

This commit is contained in:
Alexander Baldeck 2024-07-20 11:41:59 +02:00
parent 88c5f204e1
commit 7a588c325b

View File

@ -5,14 +5,15 @@
pkgname=python-platformdirs
_name="${pkgname#python-}"
pkgver=4.2.0
pkgrel=3
pkgver=4.2.2
pkgrel=1
pkgdesc='A library to determine platform-specific system directories'
arch=(any)
url='https://github.com/platformdirs/platformdirs'
license=('MIT')
depends=('python')
makedepends=(
'git'
'python-build'
'python-installer'
'python-hatchling'
@ -23,29 +24,27 @@ checkdepends=(
'python-pytest-mock'
'python-appdirs'
)
source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
b2sums=('efd79a88b7d1ea3c94be21ce01443d6429596c8e621e9589f6980877aef8d8e5c2e916b4421e9993df1f4d0184c136afcac96800af9f4283c8876d7c00a6e8d3')
source=("$pkgname::git+$url#tag=$pkgver")
sha512sums=('522b24897f31d43353429a101e29723b3ab22f0b7d801fc77ea125868cf1edfa695122350a432ce442c372361892a4f9d57dd6f31562fc14ebca30c4d4d03e4b')
b2sums=('55a18ec0b5d679c3c7b6cdb2856048b9af051e8ac4a1d839806321dff165d09a1a610fa8d3e3bb152ae69f39e5a0480723c4eaf6f269056c1bd88ac198e0af94')
build() {
cd "$_name-$pkgver"
SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
cd "$pkgname"
python -m build --wheel --no-isolation
}
check() {
cd "$_name-$pkgver"
cd "$pkgname"
PYTHONPATH="$(pwd)/src" pytest -v
}
package() {
cd "$_name-$pkgver"
cd "$pkgname"
python -m installer --destdir="$pkgdir" dist/*.whl
# symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "$site_packages/${_name}-$pkgver.dist-info/licenses/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
# vim:set ts=2 sw=2 et: