* update python-platformdirs to 3.9.1-1

This commit is contained in:
Alexander Baldeck 2023-07-28 09:52:56 +02:00
parent 94f96ab19f
commit 69cc2dbfd9

View File

@ -1,34 +1,59 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Tobias Roettger <toroettg@gmail.com>
pkgname=python-platformdirs
pkgver=3.5.0
pkgrel=2
pkgdesc='A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir"'
pkgver=3.9.1
pkgrel=1
pkgdesc='A library to determine platform-specific system directories'
arch=(any)
url="https://github.com/platformdirs/platformdirs"
url='https://github.com/platformdirs/platformdirs'
license=('MIT')
depends=('python-typing_extensions')
makedepends=('python-build' 'python-installer' 'python-hatchling' 'python-hatch-vcs')
checkdepends=('python-pytest-mock' 'python-appdirs')
source=("https://pypi.io/packages/source/p/platformdirs/platformdirs-$pkgver.tar.gz")
sha512sums=('2c454a760b3045f4824b1c436ac85533e7a6809e4525d70cee4d98289f9efc5a882384347a1992aaa237dc29ea8e778515eadeca208a2d058f9e574f5175ce20')
depends=('python' 'python-typing_extensions')
makedepends=(
'git'
'python-build'
'python-installer'
'python-hatchling'
'python-hatch-vcs'
)
checkdepends=(
'python-pytest'
'python-pytest-mock'
'python-appdirs'
)
_commit='aadc9d01acc067131c4ea52da36624c1fe2ed001'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
build() {
cd platformdirs-$pkgver
cd "$pkgname"
python -m build --wheel --no-isolation
}
check() {
cd platformdirs-$pkgver
PYTHONPATH="$PWD"/src pytest
cd "$pkgname"
PYTHONPATH="$(pwd)/src" pytest -v
}
package() {
cd platformdirs-$pkgver
python -m installer --destdir="$pkgdir/" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
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/${pkgname#python-}-$pkgver.dist-info/licenses/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: