[arch-commits] Commit in python-pyroute2/trunk (4 files)
Thore Bödecker
foxxx0 at gemini.archlinux.org
Wed Mar 30 15:41:57 UTC 2022
Date: Wednesday, March 30, 2022 @ 15:41:57
Author: foxxx0
Revision: 1177802
upgpkg: python-pyroute2 0.6.9-1 | update to upstream release 0.6.9
upstream has split their pyroute2 source tree into different sub-modules with their 0.6 branch.
this took some figuring out on how to package properly, thus the delayed pkgver bump.
the upstream tests appear to be no longer working / intended for running at downstream packaging, thus check() is now basically empty
releasing the 0.6.x package to [community-testing] initially
Added:
python-pyroute2/trunk/fix_makefile.patch
Modified:
python-pyroute2/trunk/PKGBUILD
Deleted:
python-pyroute2/trunk/fix-wireguard-key-parsing.patch
python-pyroute2/trunk/fix_sphinx_css.patch
---------------------------------+
PKGBUILD | 37 +++++++++++++-----------
fix-wireguard-key-parsing.patch | 42 ---------------------------
fix_makefile.patch | 58 ++++++++++++++++++++++++++++++++++++++
fix_sphinx_css.patch | 9 -----
4 files changed, 79 insertions(+), 67 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-30 15:40:39 UTC (rev 1177801)
+++ PKGBUILD 2022-03-30 15:41:57 UTC (rev 1177802)
@@ -6,41 +6,46 @@
_pkgbase="${pkgbase//python-/}"
pkgname=("python-${_pkgbase}")
pkgdesc="A pure Python netlink and Linux network configuration library"
-pkgver=0.5.19
-pkgrel=5
+pkgver=0.6.9
+pkgrel=1
arch=('any')
url="https://docs.pyroute2.org/"
license=('GPL2' 'Apache')
depends=('python')
-makedepends=('python' 'python-setuptools' 'python-setuptools-scm' 'python-sphinx' 'git' 'python-aafigure' 'twine')
-source=("https://files.pythonhosted.org/packages/source/${_pkgbase:0:1}/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz"
- 'fix-wireguard-key-parsing.patch')
-# source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/svinota/${_pkgbase}/archive/${pkgver}.tar.gz"
-# 'fix_sphinx_css.patch')
-sha512sums=('bd60e2adf59b8438ff4f6abf2d41cf18eb60dcef3072577648488db45ffe89bd9c7207c4eccc38eb9256533ea2950e7f20b82ae4940b1207ba71d0f261e83f6d'
- '612e81058337e4e9d08fb083cfaf0efae180fbdc6c4150fa122160aa91b71b005bacef6cd3f171091ee1cb7e79523470db156448368f183b87f6474eb984691a')
+makedepends=('python' 'python-pip' 'python-setuptools' 'python-setuptools-scm' 'python-sphinx' 'git' 'python-aafigure' 'twine' 'python-black')
+checkdepends=('python-pytest')
+source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/svinota/${_pkgbase}/archive/${pkgver}.tar.gz"
+ 'fix_makefile.patch')
+sha512sums=('4de8b8dc897959e2dc367dec460a918ace6cc096c2f634433b39d1600bafa4ca6841f54280d581f6331bf2b9776cac75e721afa2bbabbd329cc0a12b34e91fe8'
+ '05742f086de35b382aa97ac5e0bce0fd5bb2454f85d60c230a474700859af33806f45001ff7a072b71995494d747333a7f22761f5859bbf06fef59ccd81f86a9')
prepare() {
cd "${srcdir}/${_pkgbase}-${pkgver}"
- patch -p1 -N -i "${srcdir}/fix-wireguard-key-parsing.patch"
+
+ # 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
+
+ # there is some weirdness in the Makefile with respect to depencies
+ # TODO : this needs to be submitted upstream
+ patch -p1 -N -i "${srcdir}/fix_makefile.patch"
+
}
build() {
cd "${srcdir}/${_pkgbase}-${pkgver}"
- python setup.py build
+ make dist
}
check() {
cd "${srcdir}/${_pkgbase}-${pkgver}"
- python setup.py check
+ # upstream tests are not meant to be executed downstream
+ :
}
package() {
cd "${srcdir}/${_pkgbase}-${pkgver}"
- python setup.py install --root="${pkgdir}/" --optimize=1
- # Tests get installed into the package for some reason
- PYTHON_STDLIB="$(python -c "from sysconfig import get_path; print(get_path('stdlib'))")"
- rm -rf "${pkgdir%/}/${PYTHON_STDLIB#/}/site-packages/tests"
+ make root="${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
Deleted: fix-wireguard-key-parsing.patch
===================================================================
--- fix-wireguard-key-parsing.patch 2022-03-30 15:40:39 UTC (rev 1177801)
+++ fix-wireguard-key-parsing.patch 2022-03-30 15:41:57 UTC (rev 1177802)
@@ -1,42 +0,0 @@
-From 1fba06684062a298b22801c71a1ae091d313cc11 Mon Sep 17 00:00:00 2001
-From: K900 <me at 0upti.me>
-Date: Mon, 24 May 2021 09:57:11 +0300
-Subject: [PATCH] wireguard: fix parsing keys
-
-Load the keys from the correct place in the message, and load them as the right length as well.
----
- pyroute2/netlink/generic/wireguard.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/pyroute2/netlink/generic/wireguard.py b/pyroute2/netlink/generic/wireguard.py
-index 17b510d2..74f448e0 100644
---- a/pyroute2/netlink/generic/wireguard.py
-+++ b/pyroute2/netlink/generic/wireguard.py
-@@ -151,11 +151,11 @@ class wgdevice_peer(nla):
- ('WGPEER_A_PROTOCOL_VERSION', 'uint32'))
-
- class parse_peer_key(nla):
-- fields = (('key', 's'), )
-+ fields = (('key', '32s'), )
-
- def decode(self):
- nla.decode(self)
-- self['value'] = b64encode(self['value'])
-+ self['value'] = b64encode(self['key'])
-
- def encode(self):
- self['key'] = b64decode(self['value'])
-@@ -220,11 +220,11 @@ def decode(self):
- self['addr'] = '{0}/{1}'.format(self['addr'], wgaddr)
-
- class parse_wg_key(nla):
-- fields = (('key', 's'), )
-+ fields = (('key', '32s'), )
-
- def decode(self):
- nla.decode(self)
-- self['value'] = b64encode(self['value'])
-+ self['value'] = b64encode(self['key'])
-
- def encode(self):
- self['key'] = b64decode(self['value'])
Added: fix_makefile.patch
===================================================================
--- fix_makefile.patch (rev 0)
+++ fix_makefile.patch 2022-03-30 15:41:57 UTC (rev 1177802)
@@ -0,0 +1,58 @@
+Only in a: dist
+diff -upr a/Makefile b/Makefile
+--- a/Makefile 2022-03-21 09:45:51.000000000 +0100
++++ b/Makefile 2022-03-30 16:15:10.079243904 +0200
+@@ -44,7 +44,7 @@ ifdef lib
+ endif
+
+ define list_modules
+- `ls -1 | sed -n '/egg-info/n; /pyroute2/p'`
++ `find . -maxdepth 1 -mindepth 1 -type d -iname 'pyroute2*' -printf '%f\n'`
+ endef
+
+ define make_modules
+@@ -57,7 +57,7 @@ endef
+
+ define clean_module
+ if [ -f $$module/setup.json ]; then \
+- for i in `ls -1 templates`; do rm -f $$module/$$i; done; \
++ for i in `find templates -maxdepth 1 -mindepth 1 -type f -printf '%f\n'`; do rm -f $$module/$$i; done; \
+ fi; \
+ rm -f $$module/LICENSE.*; \
+ rm -f $$module/README.license.md; \
+@@ -71,7 +71,7 @@ endef
+ define process_templates
+ for module in $(call list_modules); do \
+ if [ -f $$module/setup.json ]; then \
+- for template in `ls -1 templates`; do \
++ for template in `find templates -maxdepth 1 -mindepth 1 -type f -printf '%f\n'`; do \
+ ${python} \
+ util/process_template.py \
+ templates/$$template \
+@@ -207,6 +207,8 @@ upload: dist
+ ${python} -m twine upload dist/*
+
+ setup:
++ $(MAKE) clean
++ $(MAKE) VERSION
+ $(call process_templates)
+ @for module in $(call list_modules); do $(call deploy_license); done
+ @for module in pyroute2 pyroute2.minimal; do \
+@@ -217,7 +219,7 @@ setup:
+ $$module/setup.cfg ; \
+ done
+
+-dist: clean VERSION setup
++dist: setup
+ cd pyroute2; ${python} setup.py sdist
+ mkdir dist
+ $(call make_modules, dist)
+@@ -231,7 +233,7 @@ install: dist
+ install-minimal: dist
+ ${python} -m pip install dist/pyroute2.minimal* dist/pyroute2.core* ${root}
+
+-uninstall: clean VERSION setup
++uninstall: setup
+ $(call make_modules, uninstall)
+
+ audit-imports:
Deleted: fix_sphinx_css.patch
===================================================================
--- fix_sphinx_css.patch 2022-03-30 15:40:39 UTC (rev 1177801)
+++ fix_sphinx_css.patch 2022-03-30 15:41:57 UTC (rev 1177802)
@@ -1,9 +0,0 @@
-diff -upr a/docs/conf.py b/docs/conf.py
---- a/docs/conf.py 2021-05-13 23:09:46.000000000 +0200
-+++ b/docs/conf.py 2021-09-01 11:32:22.089740192 +0200
-@@ -46,4 +46,4 @@ texinfo_documents = [('index',
-
-
- def setup(app):
-- app.add_stylesheet('custom.css')
-+ app.add_css_file('custom.css')
More information about the arch-commits
mailing list