upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-fastnumbers / trunk / PKGBUILD
blob8a847b7770b29ff09372d1de4e46d4ace0050510
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=fastnumbers
4 pkgname=python-fastnumbers
5 pkgver=5.0.1
6 pkgrel=2
7 pkgdesc="Super-fast and clean conversions to numbers"
8 arch=(x86_64)
9 url="https://github.com/SethMMorton/fastnumbers"
10 license=(MIT)
11 depends=(python)
12 makedepends=(python-build python-installer python-setuptools python-wheel)
13 checkdepends=(python-hypothesis python-numpy python-pytest python-typing_extensions)
14 optdepends=(
15   'python-numpy: for conversion to numpy arrays'
17 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
18 sha512sums=('fce2c2b71863d26bd8e93f11530a63f07ef00ea1006ea35c3d31091a352d72d4b97a3b358ba67f14522fd62e2a8e13ce3460ab3c75bbf950f664ab0eee1a7341')
19 b2sums=('ad7bcf62413399b1b90ece384215b1f7f19984af3b5cf6cad419052c5c76d211a2b28abcee5ffa3de57137c63f3494418589d55bd39f3037c931bde13ce02b90')
21 build() {
22   cd $_name-$pkgver
23   python -m build --wheel --no-isolation
26 check() {
27   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
29   cd $_name-$pkgver
30   python -m installer --destdir=test_dir dist/*.whl
31   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
32   pytest -vv
35 package() {
36   cd $_name-$pkgver
37   python -m installer --destdir="$pkgdir" dist/*.whl
38   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
39   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"