summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a51c8ab88c3ae5a8084a105df7ee033069807fb (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
# Maintainer: Groctel <aur@taxorubio.com>

_name=networkx

pkgname=python-networkx-git
pkgver=3.6.1.r35.gfa5123365
pkgrel=1
pkgdesc="Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks."

arch=("any")
license=("BSD")
url="https://github.com/networkx/networkx"

source=("git+$url#branch=main")
sha512sums=('SKIP')

conflicts=("python-networkx")
provides=("python-networkx=$pkgver")

depends=(
    "python-decorator"
    "python-matplotlib"
    "python-numpy"
    "python-pandas"
    "python-scipy"
)
makedepends=(
    "git"
    "python-build"
    "python-installer"
    "python-setuptools"
    "python-wheel"
)
checkdepends=(
    "python-pytest"
)

pkgver () {
    cd "$srcdir/$_name" || exit
    git describe --long --tags | sed 's/^networkx-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

check () {
    cd "$srcdir/$_name"
    pytest
}

package () {
    cd "$srcdir/$_name" || exit
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}