[arch-commits] Commit in pynac/trunk (PKGBUILD pynac-python-3.8.patch)

Antonio Rojas arojas at archlinux.org
Sun Jul 26 18:11:42 UTC 2020


    Date: Sunday, July 26, 2020 @ 18:11:42
  Author: arojas
Revision: 665359

Fix deprecation warnings on unpickling with Python 3.8

Added:
  pynac/trunk/pynac-python-3.8.patch
Modified:
  pynac/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   12 +++++++++---
 pynac-python-3.8.patch |   24 ++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-26 17:27:00 UTC (rev 665358)
+++ PKGBUILD	2020-07-26 18:11:42 UTC (rev 665359)
@@ -3,15 +3,21 @@
 
 pkgname=pynac
 pkgver=0.7.26
-pkgrel=4
+pkgrel=5
 pkgdesc="Python version of GiNaC, a C++ library for symbolic mathematical calculations"
 arch=(x86_64)
 url="http://pynac.org"
 license=(GPL)
 depends=(python singular) # giac disabled because of https://trac.sagemath.org/ticket/26427
-source=("https://github.com/pynac/pynac/releases/download/pynac-$pkgver/pynac-$pkgver.tar.bz2")
-sha256sums=('cc124ae9757355e3434ff864aeca6503184faf0642d26bc2f7bca6f3f2c9b50f')
+source=("https://github.com/pynac/pynac/releases/download/pynac-$pkgver/pynac-$pkgver.tar.bz2"
+         pynac-python-3.8.patch)
+sha256sums=('cc124ae9757355e3434ff864aeca6503184faf0642d26bc2f7bca6f3f2c9b50f'
+            'a5b6de6521d33d4b7e4d06e841dbfc45d71b9ded09fc38ac2e5c7b7a8564f3bd')
 
+prepare() {
+  patch -d $pkgname-$pkgver -p1 -i ../pynac-python-3.8.patch # Define PY_SSIZE_T_CLEAN as required by python 3.8
+}
+
 build() {
   cd pynac-$pkgver
 

Added: pynac-python-3.8.patch
===================================================================
--- pynac-python-3.8.patch	                        (rev 0)
+++ pynac-python-3.8.patch	2020-07-26 18:11:42 UTC (rev 665359)
@@ -0,0 +1,24 @@
+diff --git a/ginac/function.cpp b/ginac/function.cpp
+index c158723..689e2b8 100644
+--- a/ginac/function.cpp
++++ b/ginac/function.cpp
+@@ -21,6 +21,7 @@
+  */
+ 
+ #define register
++#define PY_SSIZE_T_CLEAN
+ #include <Python.h>
+ #include "py_funcs.h"
+ #include "function.h"
+diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp
+index 276d86c..b463806 100644
+--- a/ginac/numeric.cpp
++++ b/ginac/numeric.cpp
+@@ -50,6 +50,7 @@
+  */
+ 
+ #define register
++#define PY_SSIZE_T_CLEAN
+ #include <Python.h>
+ #include <longintrepr.h>
+ #include "flint/fmpz.h"



More information about the arch-commits mailing list