[sagemath] Correct side effect of using system mpmath (#974769)

pcpa pcpa at fedoraproject.org
Mon Aug 12 18:49:12 UTC 2013


commit 02277f9220f8ace4bef025e15eedd00b1148ad5d
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date:   Mon Aug 12 15:36:19 2013 -0300

    Correct side effect of using system mpmath (#974769)

 sagemath-sympy.patch |   21 +++++++++++++++++++++
 sagemath.spec        |   16 +++++++++++++---
 2 files changed, 34 insertions(+), 3 deletions(-)
---
diff --git a/sagemath-sympy.patch b/sagemath-sympy.patch
new file mode 100644
index 0000000..2725041
--- /dev/null
+++ b/sagemath-sympy.patch
@@ -0,0 +1,21 @@
+diff -up sage-5.10/spkg/build/sage-5.10/sage/env.py.orig sage-5.10/spkg/build/sage-5.10/sage/env.py
+--- sage-5.10/spkg/build/sage-5.10/sage/env.py.orig	2013-08-12 15:14:58.586048479 -0300
++++ sage-5.10/spkg/build/sage-5.10/sage/env.py	2013-08-12 15:15:55.102050643 -0300
+@@ -85,7 +85,7 @@ _add_variable_or_fallback('HOSTNAME',
+ _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
+         
+ # bunch of sage directories and files
+-_add_variable_or_fallback('SAGE_ROOT',       None)
++_add_variable_or_fallback('SAGE_ROOT',       '@@SAGE_ROOT@@')
+ _add_variable_or_fallback('SAGE_LOCAL',      opj('$SAGE_ROOT', 'local'))
+ _add_variable_or_fallback('SAGE_SHARE',      opj('$SAGE_LOCAL', 'share'))
+         
+@@ -95,7 +95,7 @@ _add_variable_or_fallback('SAGE_EXTCODE'
+ _add_variable_or_fallback('SAGE_PACKAGES',   opj('$SAGE_ROOT', 'spkg'))
+ _add_variable_or_fallback('SAGE_LOGS',       opj('$SAGE_ROOT', 'logs', 'pkgs'))
+ _add_variable_or_fallback('SAGE_SPKG_INST',  opj('$SAGE_ROOT', 'spkg', 'installed'))
+-_add_variable_or_fallback('SAGE_DOC',        opj('$SAGE_ROOT', 'devel', 'sage', 'doc'))
++_add_variable_or_fallback('SAGE_DOC',        '@@SAGE_DOC@@')
+ _add_variable_or_fallback('DOT_SAGE',        opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'))
+         
+ # SAGE_LIB is the site-packages directory if the sage library
diff --git a/sagemath.spec b/sagemath.spec
index a296333..8ab3a71 100644
--- a/sagemath.spec
+++ b/sagemath.spec
@@ -60,8 +60,6 @@
 %global	sagenb_pkg		sagenb-0.10.4
 %global sagetex_pkg		sagetex-2.3.4
 
-%global sagemath_share		%{_datadir}/%{name}
-
 %global SAGE_ROOT		%{_libdir}/sagemath
 %global SAGE_LOCAL		%{SAGE_ROOT}/local
 %global SAGE_SRC		%{SAGE_ROOT}/src
@@ -74,7 +72,7 @@ Name:		sagemath
 Group:		Applications/Engineering
 Summary:	A free open-source mathematics software system
 Version:	5.10
-Release:	1%{?dist}
+Release:	2%{?dist}
 # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
 # Additionally, every $files section has a comment with the license name
 # before files with that license
@@ -223,6 +221,10 @@ Patch34:	%{name}-rh_bz_961372.patch
 # sagemath expects python-flask-0.9
 Patch35:	%{name}-flask.patch
 
+# Side effect of using distro packages
+# https://bugzilla.redhat.com/show_bug.cgi?id=974769
+Patch36:	%{name}-sympy.patch
+
 BuildRequires:	4ti2
 BuildRequires:	atlas-devel
 BuildRequires:	cddlib-tools
@@ -725,6 +727,11 @@ popd
 %patch35 -p1
 %endif
 
+%patch36 -p1
+sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
+    -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
+    -i spkg/build/sage-%{version}/sage/env.py
+
 #------------------------------------------------------------------------
 # ensure proper/preferred libatlas is in linker path
 pushd spkg/build/sage-%{version}
@@ -1450,6 +1457,9 @@ exit 0
 
 ########################################################################
 %changelog
+* Mon Aug 12 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 5.10-2
+- Correct side effect of using system mpmath (#974769)
+
 * Mon Aug  5 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 5.10-1
 - Update to sagemath 5.10.
 


More information about the scm-commits mailing list