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

_name=networkx

pkgname=python-networkx-git
pkgver=2.6.1
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')

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

build ()
{
	cd "$srcdir/$_name"
	python setup.py build
}

package ()
{
	cd "$srcdir/$_name"
	python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
	install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}