1 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
2 # Contributor: brent s. <bts[at]square-r00t[dot]net>
3 # Contributor: Alexander Phinikarides <alexisph _AT_ gmail _DOT_ com>
5 pkgbase='python-pyroute2'
6 _pkgbase="${pkgbase//python-/}"
7 pkgname=("python-${_pkgbase}")
8 pkgdesc="A pure Python netlink and Linux network configuration library"
12 url="https://docs.pyroute2.org/"
13 license=('GPL2' 'Apache')
15 makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
16 checkdepends=('python-pytest' 'python-netaddr')
17 source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/svinota/${_pkgbase}/archive/${pkgver}.tar.gz")
18 sha512sums=('c2abf264371e1ce2a098c47b49d321a7ae790450f8c01e51adf8f04e2af07d47db47a0924b0e164530e1f3a1f81459c685fdeb0023ab42396a961514d4e64c51')
21 cd "${srcdir}/${_pkgbase}-${pkgver}"
23 # Update the version manually. Otherwise it would look for a git tag which is not present in the distribution.
24 sed -i "s/version = get_project_version.*$/version = '${pkgver}'/" util/update_version.py
28 cd "${srcdir}/${_pkgbase}-${pkgver}"
29 python -m build --wheel --no-isolation
31 # TODO: building the manpages requires additional packages
32 # - python-sphinx (available in repo)
33 # - python-aafigure (available in repo)
34 # - python-sphinx-code-include (NOT available in repo yet)
35 # https://pypi.org/project/sphinx-code-include/
37 #export PYTHONPATH="${PWD}"
43 cd "${srcdir}/${_pkgbase}-${pkgver}"
44 export PYTHONPATH="${PWD}"
46 tests/test_minimal/*.py \
51 cd "${srcdir}/${_pkgbase}-${pkgver}"
52 python -m installer --destdir="${pkgdir}" dist/*.whl
55 # vim:set ts=2 sw=2 et: