upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pyroute2 / repos / community-any / PKGBUILD
blobf31f3b806f1849d02e7445ebdc389b680723cca6
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"
9 pkgver=0.7.7
10 pkgrel=2
11 arch=('any')
12 url="https://docs.pyroute2.org/"
13 license=('GPL2' 'Apache')
14 depends=('python')
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')
20 prepare() {
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
27 build() {
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}"
38   #cd docs
39   #make man
42 check() {
43   cd "${srcdir}/${_pkgbase}-${pkgver}"
44   export PYTHONPATH="${PWD}"
45   pytest -vv \
46     tests/test_minimal/*.py \
47     tests/test_unit/*.py
50 package() {
51   cd "${srcdir}/${_pkgbase}-${pkgver}"
52   python -m installer --destdir="${pkgdir}" dist/*.whl
55 # vim:set ts=2 sw=2 et: