Date: Saturday, April 8, 2023 @ 03:11:23
  Author: felixonmars
Revision: 1441562

archrelease: copy trunk to community-staging-any

Added:
  python-pyroute2/repos/community-staging-any/
  python-pyroute2/repos/community-staging-any/PKGBUILD
    (from rev 1441556, python-pyroute2/trunk/PKGBUILD)

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Copied: python-pyroute2/repos/community-staging-any/PKGBUILD (from rev 1441556, 
python-pyroute2/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-08 03:11:23 UTC (rev 1441562)
@@ -0,0 +1,55 @@
+# Maintainer: Thore Bödecker <[email protected]>
+# Contributor: brent s. <bts[at]square-r00t[dot]net>
+# Contributor: Alexander Phinikarides <alexisph _AT_ gmail _DOT_ com>
+
+pkgbase='python-pyroute2'
+_pkgbase="${pkgbase//python-/}"
+pkgname=("python-${_pkgbase}")
+pkgdesc="A pure Python netlink and Linux network configuration library"
+pkgver=0.7.5
+pkgrel=2
+arch=('any')
+url="https://docs.pyroute2.org/";
+license=('GPL2' 'Apache')
+depends=('python')
+makedepends=('python-build' 'python-installer' 'python-wheel' 
'python-setuptools')
+checkdepends=('python-pytest' 'python-netaddr')
+source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/svinota/${_pkgbase}/archive/${pkgver}.tar.gz";)
+sha512sums=('7d381fe341ad756fa7c8a8d236f2f50858289387915b329d587aeccf201056483972b99e6c689aec86f095fc57e0966f7f4071d650eeb9b82c418741f8c4c799')
+
+prepare() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+
+  # Update the version manually. Otherwise it would look for a git tag which 
is not present in the distribution.
+  sed -i "s/version = get_project_version.*$/version = '${pkgver}'/" 
util/update_version.py
+}
+
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python -m build --wheel --no-isolation
+
+  # TODO: building the manpages requires additional packages
+  # - python-sphinx (available in repo)
+  # - python-aafigure (available in repo)
+  # - python-sphinx-code-include (NOT available in repo yet)
+  # https://pypi.org/project/sphinx-code-include/
+
+  #export PYTHONPATH="${PWD}"
+  #cd docs
+  #make man
+}
+
+check() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  export PYTHONPATH="${PWD}"
+  pytest -vv \
+    tests/test_minimal/*.py \
+    tests/test_unit/*.py
+}
+
+package() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python -m installer --destdir="${pkgdir}" dist/*.whl
+}
+
+# vim:set ts=2 sw=2 et:

Reply via email to