[arch-commits] Commit in sagemath/trunk (PKGBUILD sagemath-pynac-0.7.14.patch)

Antonio Rojas arojas at archlinux.org
Wed Dec 6 23:23:59 UTC 2017


    Date: Wednesday, December 6, 2017 @ 23:23:57
  Author: arojas
Revision: 272628

pynac 0.7.14 rebuild

Added:
  sagemath/trunk/sagemath-pynac-0.7.14.patch
Modified:
  sagemath/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |    9 +-
 sagemath-pynac-0.7.14.patch |  167 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 173 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-06 22:23:48 UTC (rev 272627)
+++ PKGBUILD	2017-12-06 23:23:57 UTC (rev 272628)
@@ -9,7 +9,7 @@
 pkgbase=sagemath
 pkgname=(sagemath sagemath-jupyter)
 pkgver=8.0
-pkgrel=11
+pkgrel=12
 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=(x86_64)
 url="http://www.sagemath.org"
@@ -38,7 +38,7 @@
         env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
         r-no-readline.patch fes02.patch sagemath-ecl-no-sigfpe.patch sagemath-cython-0.26.patch sagemath-threejs.patch
         sagemath-pynac-0.7.11.patch sagemath-pynac-0.7.12.patch sagemath-detect-igraph.patch sagemath-networkx2.patch
-        sagemath-brial-1.2.patch sagemath-linbox-1.5.patch)
+        sagemath-brial-1.2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch)
 sha256sums=('91df3e303add71616e24b38c04789f66d57ada7b1017e5369e850c42d5e8753d'
             'e0b5b8673300857fde823209a7e90faecf9e754ab812cc5e54297eddc0c79571'
             '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
@@ -56,7 +56,8 @@
             '90be1d1a90120bd5bd3620769480106ba809dd23e896bc4a3f8931e5340f3cda'
             'a1a0ab5b794136b518f5f66fe9f1689411fabb3b81560b159eae81f6f69000e3'
             '64ee1930049a17a7295bb45513efc9d484299132900fc9b8e308a9fe1a2df149'
-            'a52d03e04c9d64bb957a1f8dcdae3280ebb9450a7fd76aaf5ae5de5c6f74774f')
+            'a52d03e04c9d64bb957a1f8dcdae3280ebb9450a7fd76aaf5ae5de5c6f74774f'
+            '538f7b279d72f4b67edb445d386d267f3f7022c1079031ca7ea06f6ce392c906')
 
 prepare(){
   cd sage-$pkgver
@@ -101,6 +102,8 @@
   patch -p1 -i ../sagemath-pynac-0.7.12.patch
 # fix build with linbox 1.5 https://trac.sagemath.org/ticket/24214
   patch -p1 -i ../sagemath-linbox-1.5.patch
+# fix build with pynac 0.7.14 https://trac.sagemath.org/ticket/24329
+  patch -p1 -i ../sagemath-pynac-0.7.14.patch
 
 # use python2
   sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*

Added: sagemath-pynac-0.7.14.patch
===================================================================
--- sagemath-pynac-0.7.14.patch	                        (rev 0)
+++ sagemath-pynac-0.7.14.patch	2017-12-06 23:23:57 UTC (rev 272628)
@@ -0,0 +1,167 @@
+diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
+index d4afc4e..6d1fcac 100644
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -481,22 +481,17 @@ cdef extern from "pynac_wrap.h":
+     ctypedef GParamSet const_paramset_ref "const GiNaC::paramset&"
+ 
+     ctypedef struct py_funcs_struct:
+-        py_binomial(a, b)
+-        py_binomial_int(int n, unsigned int k)
+         py_gcd(a, b)
+         py_lcm(a, b)
+         py_real(a)
+         py_imag(a)
+         py_numer(a)
+         py_denom(a)
+-        py_conjugate(a)
+         bint py_is_rational(a)
+-        bint py_is_crational(a)
+         bint py_is_real(a)
+         bint py_is_integer(a)
+         bint py_is_equal(a, b)
+         bint py_is_even(a)
+-        bint py_is_cinteger(a)
+         bint py_is_prime(n)
+         bint py_is_exact(x)
+ 
+@@ -534,23 +529,14 @@ cdef extern from "pynac_wrap.h":
+         py_asinh(x)
+         py_acosh(x)
+         py_atanh(x)
+-        py_tgamma(x)
+-        py_lgamma(x)
+         py_isqrt(x)
+         py_sqrt(x)
+-        py_abs(x)
+         py_mod(x, y)
+         py_smod(x, y)
+         py_irem(x, y)
+-        py_iquo(x, y)
+-        py_iquo2(x, y)
+-        py_li(x, n, parent)
+-        py_li2(x)
+         py_psi(x)
+         py_psi2(n, x)
+ 
+-        int py_int_length(x) except -1
+-
+         py_eval_constant(unsigned serial, parent)
+         py_eval_unsigned_infinity()
+         py_eval_infinity()
+@@ -583,8 +569,6 @@ cdef extern from "pynac_wrap.h":
+         stdstring* py_latex_fderivative(unsigned id, params, args)
+         paramset_to_PyTuple(const_paramset_ref s)
+ 
+-        py_rational_power_parts(basis, exp)
+-
+     py_funcs_struct py_funcs "GiNaC::py_funcs"
+ 
+ cdef extern from "pynac/order.h":
+diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx
+index f303184..419cc47 100644
+--- a/src/sage/libs/pynac/pynac.pyx
++++ b/src/sage/libs/pynac/pynac.pyx
+@@ -2432,23 +2432,18 @@ def init_function_table():
+     called before Pynac is used; otherwise, there will be segfaults.
+     """
+ 
+-    py_funcs.py_binomial_int = &py_binomial_int
+-    py_funcs.py_binomial = &py_binomial
+     py_funcs.py_gcd = &py_gcd
+     py_funcs.py_lcm = &py_lcm
+     py_funcs.py_real = &py_real
+     py_funcs.py_imag = &py_imag
+     py_funcs.py_numer = &py_numer
+     py_funcs.py_denom = &py_denom
+-    py_funcs.py_conjugate = &py_conjugate
+ 
+     py_funcs.py_is_rational = &py_is_rational
+-    py_funcs.py_is_crational = &py_is_crational
+     py_funcs.py_is_real = &py_is_real
+     py_funcs.py_is_integer = &py_is_integer
+     py_funcs.py_is_equal = &py_is_equal
+     py_funcs.py_is_even = &py_is_even
+-    py_funcs.py_is_cinteger = &py_is_cinteger
+     py_funcs.py_is_prime = &py_is_prime
+     py_funcs.py_is_exact = &py_is_exact
+ 
+@@ -2462,7 +2457,6 @@ def init_function_table():
+     py_funcs.py_mpq_from_rational = &py_mpq_from_rational
+ 
+     py_funcs.py_float = &py_float
+-    py_funcs.py_RDF_from_double = &py_RDF_from_double
+ 
+     py_funcs.py_factorial = &py_factorial
+     py_funcs.py_doublefactorial = &py_doublefactorial
+@@ -2486,23 +2480,14 @@ def init_function_table():
+     py_funcs.py_asinh = &py_asinh
+     py_funcs.py_acosh = &py_acosh
+     py_funcs.py_atanh = &py_atanh
+-    py_funcs.py_tgamma = &py_tgamma
+-    py_funcs.py_lgamma = &py_lgamma
+     py_funcs.py_isqrt = &py_isqrt
+     py_funcs.py_sqrt = &py_sqrt
+-    py_funcs.py_abs = &py_abs
+     py_funcs.py_mod = &py_mod
+     py_funcs.py_smod = &py_smod
+     py_funcs.py_irem = &py_irem
+-    py_funcs.py_iquo = &py_iquo
+-    py_funcs.py_iquo2 = &py_iquo2
+-    py_funcs.py_li = &py_li
+-    py_funcs.py_li2 = &py_li2
+     py_funcs.py_psi = &py_psi
+     py_funcs.py_psi2 = &py_psi2
+ 
+-    py_funcs.py_int_length = &py_int_length
+-
+     py_funcs.py_eval_constant = &py_eval_constant
+     py_funcs.py_eval_unsigned_infinity = &py_eval_unsigned_infinity
+     py_funcs.py_eval_infinity = &py_eval_infinity
+@@ -2531,7 +2516,6 @@ def init_function_table():
+     py_funcs.py_print_fderivative =  &py_print_fderivative
+     py_funcs.py_latex_fderivative =  &py_latex_fderivative
+     py_funcs.paramset_to_PyTuple = &paramset_to_PyTuple
+-    py_funcs.py_rational_power_parts = &py_rational_power_parts
+ 
+ init_function_table()
+ init_pynac_I()
+
+diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
+index 81cd485..931cecc 100644
+--- a/src/sage/functions/other.py
++++ b/src/sage/functions/other.py
+@@ -688,7 +688,6 @@ class Function_gamma(GinacFunction):
+             :meth:`sage.functions.other.gamma`
+         """
+         GinacFunction.__init__(self, 'gamma', latex_name=r"\Gamma",
+-                               ginac_name='tgamma',
+                                conversions={'mathematica':'Gamma',
+                                             'maple':'GAMMA',
+                                             'sympy':'gamma',
+diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
+index 1739067..d4afc4e 100644
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -362,7 +362,7 @@ cdef extern from "pynac_wrap.h":
+     GEx g_zeta2 "GiNaC::zeta" (GEx m, GEx s)            except + # alternating Euler sum
+     GEx g_stieltjes "GiNaC::stieltjes" (GEx m)          except + # Stieltjes constants
+     GEx g_zetaderiv "GiNaC::zetaderiv" (GEx n, GEx x)   except + # derivatives of Riemann's zeta function
+-    GEx g_tgamma "GiNaC::tgamma" (GEx x)                except + # gamma function
++    GEx g_gamma "GiNaC::gamma" (GEx x)                  except + # gamma function
+     GEx g_lgamma "GiNaC::lgamma" (GEx x)                except + # logarithm of gamma function
+     GEx g_beta "GiNaC::beta" (GEx x, GEx y)             except + # beta function (tgamma(x)*tgamma(y)/tgamma(x+y))
+     GEx g_psi "GiNaC::psi" (GEx x)                      except + # psi (digamma) function
+diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
+index dfb8751..52303d1 100644
+--- a/src/sage/symbolic/expression.pyx
++++ b/src/sage/symbolic/expression.pyx
+@@ -8917,7 +8917,7 @@ cdef class Expression(CommutativeRingElement):
+         cdef GEx x
+         sig_on()
+         try:
+-            x = g_hold_wrapper(g_tgamma, self._gobj, hold)
++            x = g_hold_wrapper(g_gamma, self._gobj, hold)
+         finally:
+             sig_off()
+         return new_Expression_from_GEx(self._parent, x)



More information about the arch-commits mailing list