ayaports/testing/py3-ua-parser/APKBUILD

56 lines
1.3 KiB
Text
Raw Normal View History

2022-12-27 20:40:33 +00:00
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
_pyname=ua-parser
pkgname="py3-$_pyname"
2023-08-30 17:55:55 +00:00
pkgver=0.18.0
_uapcorever=0.18.0
pkgrel=0
2023-08-11 19:49:05 +00:00
arch="noarch"
2022-12-27 20:40:33 +00:00
pkgdesc="Python port of Browserscope's user agent parser"
url="https://pypi.python.org/project/$_pyname"
2023-08-30 17:55:55 +00:00
license="Apache-2.0"
depends="
py3-pyaml
"
makedepends="
py3-setuptools
py3-gpep517
py3-installer
py3-wheel
"
checkdepends="
py3-pytest
"
2022-12-27 20:40:33 +00:00
source="
$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz
$pkgname-core-$_uapcorever.tar.gz::https://github.com/ua-parser/uap-core/archive/refs/tags/v$_uapcorever.tar.gz
"
builddir="$srcdir"/$_pyname-$pkgver
2023-08-30 17:55:55 +00:00
subpackages="$pkgname-pyc"
2022-12-27 20:40:33 +00:00
prepare() {
2023-03-31 20:26:25 +00:00
default_prepare
2022-12-27 20:40:33 +00:00
ln -s "$srcdir"/uap-core-$_uapcorever "$builddir"/uap-core
}
build() {
2023-08-30 17:55:55 +00:00
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
2022-12-27 20:40:33 +00:00
}
check() {
2023-08-30 17:55:55 +00:00
pytest -v
2022-12-27 20:40:33 +00:00
}
package() {
2023-08-30 17:55:55 +00:00
python3 -m installer -d "$pkgdir" \
dist/*.whl
2022-12-27 20:40:33 +00:00
}
2023-08-30 17:55:55 +00:00
2022-12-27 20:40:33 +00:00
sha512sums="
2023-08-30 17:55:55 +00:00
1b3685df8fc65f529b3a54d7bc56aa6d2df56e028d3a2fd2206826119c1ccabe2aaf7dd4c2c00122a0189c0987360a6d7af12ec2dac444b55cf745ebfc7365fd py3-ua-parser-0.18.0.tar.gz
78cf77d38e5738651060d194c94cd5c6e514e4fd01da121250d016bbe6a8967e0c56a91ae26117832c11aa50d9afec8ac06fe7a7568a55bf7098ff21bc279567 py3-ua-parser-core-0.18.0.tar.gz
2022-12-27 20:40:33 +00:00
"