mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Add patch for python 3.11 compatibility (bz 2099168)
- Add workaround for symlink/directory conflict (bz 2097773) - Modify the jmol patch to timeout after 5 minutes. This is a workaround for recently observed jmol hangs, but is not a proper fix.
This commit is contained in:
parent
78d0fd60e9
commit
457c650d21
3 changed files with 472 additions and 12 deletions
|
@ -84,7 +84,7 @@
|
|||
Name: sagemath
|
||||
Summary: A free open-source mathematics software system
|
||||
Version: 9.6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?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
|
||||
|
@ -178,6 +178,9 @@ Patch21: %{name}-infinite-recursion.patch
|
|||
# Fix a use-after-free bug
|
||||
Patch22: %{name}-use-after-free.patch
|
||||
|
||||
# Adapt to changes in python 3.11
|
||||
Patch23: %{name}-python3.11.patch
|
||||
|
||||
BuildRequires: 4ti2
|
||||
BuildRequires: 4ti2-devel
|
||||
BuildRequires: appstream
|
||||
|
@ -981,6 +984,7 @@ popd
|
|||
%patch20
|
||||
%patch21
|
||||
%patch22
|
||||
%patch23
|
||||
|
||||
sed -i 's|@@SAGE_LOCAL@@|%{SAGE_LOCAL}|' src/sage/env.py
|
||||
|
||||
|
@ -1030,6 +1034,9 @@ sed -i 's/3\.11\.0/3.12.0/g' configure
|
|||
# Allow use of libfplll 5.4.2
|
||||
sed -i 's/5\.4\.1/5.4.2/g' configure
|
||||
|
||||
# Allow use of eclib 20220621
|
||||
sed -i 's/20210625/20220621/g' configure
|
||||
|
||||
# Do not build with -march=native
|
||||
sed -i 's/CFLAGS_MARCH="-march=native"/CFLAGS_MARCH=""/' configure
|
||||
|
||||
|
@ -1037,7 +1044,6 @@ sed -i 's/CFLAGS_MARCH="-march=native"/CFLAGS_MARCH=""/' configure
|
|||
########################################################################
|
||||
%build
|
||||
export LC_ALL=C.UTF-8
|
||||
export CC=%{__cc}
|
||||
export CPPFLAGS="-I%{_includedir}/4ti2 -I%{_includedir}/arb -I%{_includedir}/cddlib"
|
||||
export ECMBIN=%{_bindir}/gmp-ecm
|
||||
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
|
||||
|
@ -1678,10 +1684,9 @@ mkdir -p %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremon
|
|||
rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_ver}
|
||||
|
||||
%if %{with docs}
|
||||
########################################################################
|
||||
# Fix directory/symlink conflicts introduced by fix for bz 1875606.
|
||||
# This can be removed when Fedora 36 reaches EOL.
|
||||
%pretrans -n sagemath-doc-en -p <lua>
|
||||
-- Fix directory/symlink conflicts introduced by fix for bz 1875606.
|
||||
-- This can be removed when Fedora 36 reaches EOL.
|
||||
paths = {
|
||||
"%{SAGE_DOC}/html/en/_static/config",
|
||||
"%{SAGE_DOC}/html/en/_static/extensions",
|
||||
|
@ -1765,6 +1770,20 @@ for _, path in ipairs(paths) do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Fix directory/symlink conflicts introduced by sagemath 3.5 -> 3.6 upgrade.
|
||||
-- This can be removed when Fedora 40 reaches EOL.
|
||||
paths2 = {
|
||||
"%{SAGE_DOC}/html/en/reference/plot3d/_static",
|
||||
"%{SAGE_DOC}/html/en/reference/repl/_static"
|
||||
}
|
||||
|
||||
for _, path in ipairs(paths2) do
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "link" then
|
||||
os.remove(path)
|
||||
end
|
||||
end
|
||||
%endif
|
||||
|
||||
|
||||
|
@ -2021,6 +2040,12 @@ end
|
|||
|
||||
########################################################################
|
||||
%changelog
|
||||
* Tue Jul 5 2022 Jerry James <loganjerry@gmail.com> - 9.6-3
|
||||
- Add patch for python 3.11 compatibility (bz 2099168)
|
||||
- Add workaround for symlink/directory conflict (bz 2097773)
|
||||
- Modify the jmol patch to timeout after 5 minutes. This is a workaround for
|
||||
recently observed jmol hangs, but is not a proper fix.
|
||||
|
||||
* Tue Jun 21 2022 Python Maint <python-maint@redhat.com> - 9.6-2
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue