Date: Wednesday, December 14, 2022 @ 13:25:33
  Author: foxxx0
Revision: 1359023

upgpkg: python-pyroute2 0.7.3-1 | bump to upstream release 0.7.3, rework 
packaging

 - remove python-pip dep 
(https://archlinux.org/todo/remove-python-pip-from-makedepends/)
 - remove docs-related makedeps (we're currently not building docs)
 - remove obsolete makedeps
 - build+package using python build+installer
 - add some remarks w.r.t. how manpages could be generated in the future

Modified:
  python-pyroute2/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-12-14 13:08:28 UTC (rev 1359022)
+++ PKGBUILD    2022-12-14 13:25:33 UTC (rev 1359023)
@@ -6,16 +6,16 @@
 _pkgbase="${pkgbase//python-/}"
 pkgname=("python-${_pkgbase}")
 pkgdesc="A pure Python netlink and Linux network configuration library"
-pkgver=0.6.13
+pkgver=0.7.3
 pkgrel=1
 arch=('any')
 url="https://docs.pyroute2.org/";
 license=('GPL2' 'Apache')
 depends=('python')
-makedepends=('python' 'python-pip' 'python-setuptools' 'python-setuptools-scm' 
'python-sphinx' 'git' 'python-aafigure' 'twine' 'python-black')
-checkdepends=('python-pytest')
+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=('e274a07afa419f6dde745f02400efd7288bdd361e1e5232d9484b135b0e2a7902909d3d564217d65379ab38cb318db438dc5e7f93cb190af8cc3bb1d9d19e98c')
+sha512sums=('c8aeddaeaa014bcf8c4b831cb5b4080db5c99b582f3999fdbdd840b9448e032fbbf64ce5707ebc0795765138d8e89cde830efb2469c827ed8d4e63dd1beafe62')
 
 prepare() {
   cd "${srcdir}/${_pkgbase}-${pkgver}"
@@ -22,23 +22,34 @@
 
   # 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
-  sed -i "s/^VERSION=.*\$/VERSION='${pkgver}'/" tests/conf.sh
 }
 
 build() {
   cd "${srcdir}/${_pkgbase}-${pkgver}"
-  make dist
+  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}"
-  # upstream tests are not meant to be executed downstream
-  :
+  export PYTHONPATH="${PWD}"
+  pytest -vv \
+    tests/test_minimal/*.py \
+    tests/test_unit/*.py
 }
 
 package() {
   cd "${srcdir}/${_pkgbase}-${pkgver}"
-  make root="${pkgdir}/" install
+  python -m installer --destdir="${pkgdir}" dist/*.whl
 }
 
 # vim:set ts=2 sw=2 et:

Reply via email to