Correct side effect of using system mpmath (#974769)

This commit is contained in:
pcpa 2013-08-12 15:36:19 -03:00
parent f796ecaf2b
commit 02277f9220
2 changed files with 34 additions and 3 deletions

21
sagemath-sympy.patch Normal file
View file

@ -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

View file

@ -60,8 +60,6 @@
%global sagenb_pkg sagenb-0.10.4 %global sagenb_pkg sagenb-0.10.4
%global sagetex_pkg sagetex-2.3.4 %global sagetex_pkg sagetex-2.3.4
%global sagemath_share %{_datadir}/%{name}
%global SAGE_ROOT %{_libdir}/sagemath %global SAGE_ROOT %{_libdir}/sagemath
%global SAGE_LOCAL %{SAGE_ROOT}/local %global SAGE_LOCAL %{SAGE_ROOT}/local
%global SAGE_SRC %{SAGE_ROOT}/src %global SAGE_SRC %{SAGE_ROOT}/src
@ -74,7 +72,7 @@ Name: sagemath
Group: Applications/Engineering Group: Applications/Engineering
Summary: A free open-source mathematics software system Summary: A free open-source mathematics software system
Version: 5.10 Version: 5.10
Release: 1%{?dist} Release: 2%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name # Additionally, every $files section has a comment with the license name
# before files with that license # before files with that license
@ -223,6 +221,10 @@ Patch34: %{name}-rh_bz_961372.patch
# sagemath expects python-flask-0.9 # sagemath expects python-flask-0.9
Patch35: %{name}-flask.patch 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: 4ti2
BuildRequires: atlas-devel BuildRequires: atlas-devel
BuildRequires: cddlib-tools BuildRequires: cddlib-tools
@ -725,6 +727,11 @@ popd
%patch35 -p1 %patch35 -p1
%endif %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 # ensure proper/preferred libatlas is in linker path
pushd spkg/build/sage-%{version} pushd spkg/build/sage-%{version}
@ -1450,6 +1457,9 @@ exit 0
######################################################################## ########################################################################
%changelog %changelog
* Mon Aug 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-2
- Correct side effect of using system mpmath (#974769)
* Mon Aug 5 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-1 * Mon Aug 5 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-1
- Update to sagemath 5.10. - Update to sagemath 5.10.