summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 692ac2072d55cc89c368ebedea1de60b2eee91d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: peippo <christoph+aur@christophfink.com>

pkgname=python-pandarm
_name=${pkgname#python-}
pkgdesc="Python library for network analysis that uses contraction hierarchies."
url="https://oturns.github.io/pandarm/"

pkgver=0.0.5
pkgrel=2

arch=("x86_64")
license=("AGPL-3.0-only")

makedepends=(
    #"clang"
    "python-build"
    "python-installer"
    "python-setuptools-scm"
    "python-wheel"
)
depends=(
    "cython"
    "python"
    "python-geopandas"
    "python-narwhals"
    "python-numpy"
    "python-pandas"
    "python-pytables"
    "python-scikit-learn"
)
optdepends=(
    "python-osmnx"
)
checkdepends=(
    "${optdepends[@]}"
    "python-pytest"
    "python-pytest-cov"
)

source=( "https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
b2sums=("deacb24ab390c46d3cdfa779d72041451534d601fc7f7e8741b4493cb4bdfaa9b011cca22a5d1d5c3452b3b5aa2352bf6c42414985b6eb7da27e8af541b46880")

build() {
    cd "${srcdir}"/${_name}-${pkgver}
    python -m build --wheel --no-isolation
}

check() {
    cd "${srcdir}"/${_name}-${pkgver}

    local TEST_VENV="${srcdir}/test-venv"
    python -m venv --system-site-packages "${TEST_VENV}"
    "${TEST_VENV}"/bin/python -m installer dist/*.whl

    "${TEST_VENV}"/bin/python -P -m pytest
}

package() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl
}