[arch-commits] Commit in python-prctl/trunk (PKGBUILD python310.diff)

Chih-Hsuan Yen yan12125 at gemini.archlinux.org
Sat Dec 4 10:28:12 UTC 2021


    Date: Saturday, December 4, 2021 @ 10:28:12
  Author: yan12125
Revision: 1065003

python-prctl: fix tests with Python 3.10

Added:
  python-prctl/trunk/python310.diff
Modified:
  python-prctl/trunk/PKGBUILD

----------------+
 PKGBUILD       |    7 +++++--
 python310.diff |   13 +++++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-04 10:13:53 UTC (rev 1065002)
+++ PKGBUILD	2021-12-04 10:28:12 UTC (rev 1065003)
@@ -13,15 +13,18 @@
 checkdepends=('iputils' 'procps-ng')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/seveas/python-prctl/archive/v$pkgver.tar.gz"
         "$pkgname-kernel-5.10.patch::https://github.com/seveas/python-prctl/pull/33.patch"
-        "skip-tests.diff")
+        "skip-tests.diff"
+        "python310.diff")
 sha512sums=('a251b0aefbd6a16d69fd664cadf87ba16af87e7551ae474846858876007028c13b619e227518688e876f95726d327eb4793c37a34317ec8a1bf2c6ea02a31b21'
             '839bd732ebe4318dd11a2f0037fd60e6b79de84374ef575278cd787eac87c19b00290f5871e70ebb14301fb8a7eb2dc718a754290285cc6f2e9abe6ef161b802'
-            'd7aa5bf2a1854892d2a62fd78f713e6a9df5ff7b6d44a676316970dba348590151d6db5e0583d039db816d361793c8d2f143836bd4113f881e823c741f462bed')
+            'd7aa5bf2a1854892d2a62fd78f713e6a9df5ff7b6d44a676316970dba348590151d6db5e0583d039db816d361793c8d2f143836bd4113f881e823c741f462bed'
+            '31095f7d60cce5b5e8800e7b06e464b9149a114cd544864825b7f4bfb14892bfbbf212923c8f0c687446dd78bcb2109f6f3f08351fe0885a45dad8982b7e57d4')
 
 prepare() {
   cd python-prctl-$pkgver
   patch -Np1 -i ../$pkgname-kernel-5.10.patch
   patch -Np1 -i ../skip-tests.diff
+  patch -Np1 -i ../python310.diff
 }
 
 build() {

Added: python310.diff
===================================================================
--- python310.diff	                        (rev 0)
+++ python310.diff	2021-12-04 10:28:12 UTC (rev 1065003)
@@ -0,0 +1,13 @@
+diff --git a/test_prctl.py b/test_prctl.py
+index df84986..ea53fb0 100644
+--- a/test_prctl.py
++++ b/test_prctl.py
+@@ -20,7 +20,7 @@ except ImportError:
+     pass
+ 
+ curdir = os.path.dirname(__file__)
+-builddir = os.path.join(curdir, 'build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3]))
++builddir = os.path.join(curdir, 'build', 'lib.%s-%d.%d' % (distutils.util.get_platform(), *sys.version_info[0:2]))
+ 
+ # Always run from the builddir
+ if not os.path.exists(builddir) or \



More information about the arch-commits mailing list