[arch-commits] Commit in sagemath/trunk (PKGBUILD python-2.7.11.patch)

Antonio Rojas arojas at archlinux.org
Sat Dec 19 11:03:08 UTC 2015


    Date: Saturday, December 19, 2015 @ 12:03:07
  Author: arojas
Revision: 153716

Fix timeit with python 2.7.11

Added:
  sagemath/trunk/python-2.7.11.patch
Modified:
  sagemath/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   11 +++++++----
 python-2.7.11.patch |   11 +++++++++++
 2 files changed, 18 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-12-19 05:20:58 UTC (rev 153715)
+++ PKGBUILD	2015-12-19 11:03:07 UTC (rev 153716)
@@ -9,7 +9,7 @@
 
 pkgname=sagemath
 pkgver=6.10
-pkgrel=1
+pkgrel=2
 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=(i686 x86_64)
 url="http://www.sagemath.org"
@@ -32,7 +32,7 @@
 source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz" 
 	"http://mirrors.mit.edu/sage/spkg/upstream/pexpect/pexpect-2.0.tar.bz2"
 	anal.h package.patch env.patch paths.patch clean.patch skip-check.patch
-	pexpect-env.patch pexpect-del.patch disable-fes.patch jupyter-path.patch test-optional.patch)
+	pexpect-env.patch pexpect-del.patch disable-fes.patch jupyter-path.patch test-optional.patch python-2.7.11.patch)
 md5sums=('3c92d9cc67e2be5bc7802427e84b9b71'
          'd9a3e113ed147dcee8f89962a8dccd43'
          'a906a180d198186a39820b0a2f9a9c63'
@@ -45,7 +45,8 @@
          'f333939ea6c41377b66407c81016cee4'
          '4eb23a3c7363258bc9ba764d6e5512ba'
          '16b529194c6105c3364127bd8f1efa83'
-         'cdcabd475b80afe0534a5621e972736e')
+         'cdcabd475b80afe0534a5621e972736e'
+         'ef927896f2071b442b1d07d7e69f5f3a')
 
 prepare(){
   cd sage-$pkgver
@@ -76,6 +77,8 @@
   patch -p0 -i ../test-optional.patch
 # set jupyter path
   patch -p0 -i ../jupyter-path.patch
+# fix timeit with Python 2.7.11
+  patch -p0 -i ../python-2.7.11.patch
 
 # Upstream patches  
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
@@ -85,7 +88,7 @@
 
 # use python2
   sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
-  sed -e 's|cython %s %s|cython2 %s %s|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
   sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|' -i src/bin/sage
   sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
   sed -e 's|python -c|python2 -c|' -i src/Makefile

Added: python-2.7.11.patch
===================================================================
--- python-2.7.11.patch	                        (rev 0)
+++ python-2.7.11.patch	2015-12-19 11:03:07 UTC (rev 153716)
@@ -0,0 +1,11 @@
+--- src/sage/misc/sage_timeit.py.orig	2015-12-19 11:09:42.836938821 +0100
++++ src/sage/misc/sage_timeit.py	2015-12-19 11:10:27.090217304 +0100
+@@ -217,7 +217,7 @@
+     # but is there a better way to achieve that the code stmt has access
+     # to the shell namespace?
+ 
+-    src = timeit_.template % {'stmt': timeit_.reindent(stmt, 8),
++    src = timeit_.template % {'init': "", 'stmt': timeit_.reindent(stmt, 8),
+                              'setup': "pass"}
+     code = compile(src, "<magic-timeit>", "exec")
+     ns = {}



More information about the arch-commits mailing list