[arch-commits] Commit in python-inet_diag/trunk (2 files)

David Runge dvzrv at archlinux.org
Sun Nov 15 21:24:03 UTC 2020


    Date: Sunday, November 15, 2020 @ 21:24:02
  Author: dvzrv
Revision: 754785

Prepare for python 3.9.0.

Add patch to remove deprecated PyObject struct member.
Switch to correct license (GPL2).
Update maintainer info.

Added:
  python-inet_diag/trunk/python-inet_diag-0.2.1-remove_legacy_struct_member.patch
Modified:
  python-inet_diag/trunk/PKGBUILD

----------------------------------------------------------+
 PKGBUILD                                                 |   19 ++++++++-----
 python-inet_diag-0.2.1-remove_legacy_struct_member.patch |   19 +++++++++++++
 2 files changed, 31 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-15 20:40:09 UTC (rev 754784)
+++ PKGBUILD	2020-11-15 21:24:02 UTC (rev 754785)
@@ -1,4 +1,4 @@
-# Maintainer: David Runge <dave at sleepmap.de>
+# Maintainer: David Runge <dvzrv at archlinux.org>
 # Contributor: Joakim Hernberg <jhernberg at alchemy.lu>
 
 pkgname=python-inet_diag
@@ -7,15 +7,21 @@
 pkgdesc="Python bindings for the inet_diag kernel interface"
 arch=('x86_64')
 url="https://git.kernel.org/pub/scm/libs/python/python-inet_diag/python-inet_diag.git/"
-license=('GPL')
+license=('GPL2')
 depends=('python')
 makedepends=('python-setuptools')
-source=("https://git.kernel.org/pub/scm/libs/python/${pkgname}/${pkgname}.git/snapshot/${pkgname}-${pkgver}.tar.gz")
-sha512sums=('fe9c5a51d0b29abdb765990db37ab6f399aa5f46fa068655892181fea413d41a07486af7509540518a765d03fb4981a8a8784e5aa8b0367bb65bc36ef136be32')
+source=("https://git.kernel.org/pub/scm/libs/python/${pkgname}/${pkgname}.git/snapshot/${pkgname}-${pkgver}.tar.gz"
+        "${pkgname}-0.2.1-remove_legacy_struct_member.patch")
+sha512sums=('fe9c5a51d0b29abdb765990db37ab6f399aa5f46fa068655892181fea413d41a07486af7509540518a765d03fb4981a8a8784e5aa8b0367bb65bc36ef136be32'
+            '9a49dc11035fa22bc15f5172615a74d25925a807201be1cec33db775635a84b6411f03a3365d5e45479d229c69496c45ab87caa5cfd582ff0bd84c41ed86e160')
+b2sums=('2c741c1b31e7d67db837d30982e19ad038715c067a13e945d8585eaeb90142f45d6646814c346033c846c436de6beae7ee5f69d3a1649393ba6ec05a89a44fc7'
+        '3ae80258dea549d3ade8cd01a82a4b2559a9a120b8bdd7dc331b984b9d3fd6991d2f23ac6df7bf60c2357a59be98a066173fc554d8c6b1000e1bf2b76af44d9b')
 
 prepare() {
   cd "${pkgname}-${pkgver}"
   sed -e '1s/python2/python/' -i setup.py
+  # Removed in Python 3.9. Ignored in Python 3.0+ anyway.
+  patch -Np1 -i "../${pkgname}-0.2.1-remove_legacy_struct_member.patch"
 }
 
 build() {
@@ -26,9 +32,8 @@
 package_python-inet_diag() {
   cd "${pkgname}-${pkgver}"
   python setup.py install --skip-build \
-    --optimize=1 \
-    --prefix=/usr \
-    --root="${pkgdir}/"
+                          --optimize=1 \
+                          --root="${pkgdir}/"
   install -vDm 775 psk.py "${pkgdir}/usr/bin/psk"
   install -vDm 775 pss.py "${pkgdir}/usr/bin/pss"
 }

Added: python-inet_diag-0.2.1-remove_legacy_struct_member.patch
===================================================================
--- python-inet_diag-0.2.1-remove_legacy_struct_member.patch	                        (rev 0)
+++ python-inet_diag-0.2.1-remove_legacy_struct_member.patch	2020-11-15 21:24:02 UTC (rev 754785)
@@ -0,0 +1,19 @@
+diff -ruN a/python-inet_diag/inet_diag.c b/python-inet_diag/inet_diag.c
+--- a/python-inet_diag/inet_diag.c	2016-04-07 16:39:56.000000000 +0200
++++ b/python-inet_diag/inet_diag.c	2020-11-15 22:20:23.580012069 +0100
+@@ -525,7 +525,6 @@
+ 	.tp_name	= "inet_socket",
+ 	.tp_basicsize	= sizeof(struct inet_socket),
+ 	.tp_dealloc	= (destructor)inet_socket__dealloc,
+-	.tp_print	= (printfunc)inet_socket__print,
+ 	.tp_getattr	= (getattrfunc)inet_socket__getattr,
+ };
+ 
+@@ -749,7 +748,6 @@
+ 	.tp_name	= "inet_diag",
+ 	.tp_basicsize	= sizeof(struct inet_diag),
+ 	.tp_dealloc	= (destructor)inet_diag__dealloc,
+-	.tp_print	= (printfunc)inet_diag__print,
+ 	.tp_getattr	= (getattrfunc)inet_diag__getattr,
+ };
+ 


More information about the arch-commits mailing list