Compare commits

..

14 Commits
f35 ... rawhide

Author SHA1 Message Date
Jerry James
e6b3f6e094 Fix incompatible pointer types for GCC 14 compatibility 2023-11-30 14:20:31 -07:00
Fedora Release Engineering
1d937a42c4 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 03:00:22 +00:00
Jerry James
b35bbd6d2f Version 1.12
Add patch for python 3.12 compatibility
2023-06-29 19:26:16 -06:00
Python Maint
90dae4419a Rebuilt for Python 3.12 2023-06-29 23:31:27 +02:00
Jerry James
0ef50362de Fix the antlr4 Recommends (bz 2172030).
Dynamically generate BuildRequires (to the extent possible).
2023-02-21 09:48:32 -07:00
Fedora Release Engineering
1c7ace92c0 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 04:29:17 +00:00
Jerry James
5f035ec062 Do not run antlr on i386 where it doesn't exist.
Be archful so we don't BR a package that doesn't exist on i386.
2022-09-27 16:07:25 -06:00
Jerry James
b38dd2ea96 Version 1.11.1.
- Convert License tag to SPDX.
- Drop upstreamed patches: -tests, -distutils, -signature.
- Drop fastcache dependency.
- Regenerate ANTLR4 files.
2022-09-06 17:14:47 -06:00
Fedora Release Engineering
d795184ee6 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 09:55:38 +00:00
Miro Hrončok
840a227035 Use inspect.signature instead of deprecated formatargspec 2022-06-17 01:44:48 +02:00
Python Maint
065f397aa9 Rebuilt for Python 3.11 2022-06-15 15:04:07 +02:00
Jerry James
c076187b4d Version 1.10.1. 2022-03-20 16:36:48 -06:00
Jerry James
3018ce1e1b Version 1.10.
Drop upstreamed patches: -python3, -png-decoder, -gmpy2-mpq, and
-rational-exponent.
2022-03-17 15:51:37 -06:00
Fedora Release Engineering
a5f1a8356c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 02:08:45 +00:00
11 changed files with 302 additions and 233 deletions

View File

@ -1 +1 @@
SHA512 (sympy-1.9.tar.gz) = 139712219ba6bf420ba89b3f8d086ab8883c5ab965e9308ba9ee665ac3ac69a9b16fa30c6f5dfbc77dd34873ff3ff95c0d058954d7f9d853f5e9537efc24dd3c SHA512 (sympy-1.12.tar.gz) = 96a89b88f6912d70c56f5bd1903dd3c518963118ff25d033cdcb7da2f260b8ee209d3ab4a4394dd2b5dc0b4585b71ccd55d55c8e5c6e28024cccbedf07ee4360

View File

@ -1,10 +0,0 @@
--- a/sympy/testing/runtests.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/testing/runtests.py 2021-10-08 11:27:24.434239376 -0600
@@ -184,6 +184,7 @@ def raise_on_deprecated():
"""
with warnings.catch_warnings():
warnings.filterwarnings('error', '.*', DeprecationWarning, module='sympy.*')
+ warnings.filterwarnings('ignore', '.*', DeprecationWarning, module='sympy.utilities.*')
yield

View File

@ -1,11 +0,0 @@
--- a/sympy/external/tests/test_pythonmpq.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/external/tests/test_pythonmpq.py 2021-10-08 11:06:59.453830335 -0600
@@ -42,7 +42,7 @@ def test_PythonMPQ():
assert check_Q(Q(Q(3, 5))) == (3, 5)
assert check_Q(Q(0.5)) == (1, 2)
assert check_Q(Q('0.5')) == (1, 2)
- assert check_Q(Q(Decimal('0.6'))) == (3, 5)
+ assert check_Q(Q(str(Decimal('0.6')))) == (3, 5)
assert check_Q(Q(Fraction(3, 5))) == (3, 5)
# Invalid types

View File

@ -0,0 +1,38 @@
Fixes this error with GCC 14 and numpy 1.19.0 or later:
wrapper_module_15.c:32:60: error: initialization of void (*)(char **, const npy_intp *, const npy_intp *, void *) {aka void (*)(char **, const long int *, const long int *, void *)} from incompatible pointer type void (*)(char **, npy_intp *, npy_intp *, void *) {aka void (*)(char **, long int *, long int *, void *)}
32 | PyUFuncGenericFunction wrapped_281000935073472_funcs[1] = {&wrapped_281000935073472_ufunc};
| ^
error: command '/usr/bin/gcc' failed with exit code 1
--- sympy-sympy-1.12/sympy/utilities/autowrap.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/utilities/autowrap.py 2023-11-30 13:26:06.612852361 -0700
@@ -714,7 +714,7 @@ static PyMethodDef ${module}Methods[] =
_ufunc_outcalls = Template("*((double *)out${outnum}) = ${funcname}(${call_args});")
_ufunc_body = Template("""\
-static void ${funcname}_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+static void ${funcname}_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
{
npy_intp i;
npy_intp n = dimensions[0];
--- sympy-sympy-1.12/sympy/utilities/tests/test_autowrap.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/utilities/tests/test_autowrap.py 2023-11-30 12:42:03.489842964 -0700
@@ -284,7 +284,7 @@ static PyMethodDef wrapper_module_%(num)
{NULL, NULL, 0, NULL}
};
-static void test_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+static void test_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
{
npy_intp i;
npy_intp n = dimensions[0];
@@ -378,7 +378,7 @@ static PyMethodDef wrapper_module_%(num)
{NULL, NULL, 0, NULL}
};
-static void multitest_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+static void multitest_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
{
npy_intp i;
npy_intp n = dimensions[0];

View File

@ -1,22 +0,0 @@
diff --git a/sympy/printing/preview.py b/sympy/printing/preview.py
index 52085e5e19..f9b1d2dd5c 100644
--- a/sympy/printing/preview.py
+++ b/sympy/printing/preview.py
@@ -27,12 +27,12 @@ def _check_output_no_window(*args, **kwargs):
def _run_pyglet(fname, fmt):
from pyglet import window, image, gl
from pyglet.window import key
+ from pyglet.image.codecs import ImageDecodeException
- if fmt == "png":
- from pyglet.image.codecs.png import PNGImageDecoder
- img = image.load(fname, decoder=PNGImageDecoder())
- else:
- raise ValueError("pyglet preview works only for 'png' files.")
+ try:
+ img = image.load(fname)
+ except ImageDecodeException:
+ raise ValueError("pyglet preview does not work for '{}' files.".format(fmt))
offset = 25

103
sympy-python3.12.patch Normal file
View File

@ -0,0 +1,103 @@
--- sympy-sympy-1.12/sympy/logic/boolalg.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/logic/boolalg.py 2023-06-29 16:38:14.568908065 -0600
@@ -1012,7 +1012,7 @@ class Xor(BooleanFunction):
for j in range(i + 1, len(rel)):
rj, cj = rel[j][:2]
if cj == nc:
- odd = ~odd
+ odd = not odd
break
elif cj == c:
break
--- sympy-sympy-1.12/sympy/parsing/ast_parser.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/parsing/ast_parser.py 2023-06-29 17:12:19.620751353 -0600
@@ -23,7 +23,7 @@ from sympy.core.basic import Basic
from sympy.core.sympify import SympifyError
from ast import parse, NodeTransformer, Call, Name, Load, \
- fix_missing_locations, Str, Tuple
+ fix_missing_locations, Constant, Tuple
class Transform(NodeTransformer):
@@ -52,7 +52,7 @@ class Transform(NodeTransformer):
elif node.id in ['True', 'False']:
return node
return fix_missing_locations(Call(func=Name('Symbol', Load()),
- args=[Str(node.id)], keywords=[]))
+ args=[Constant(node.id)], keywords=[]))
def visit_Lambda(self, node):
args = [self.visit(arg) for arg in node.args.args]
--- sympy-sympy-1.12/sympy/parsing/sympy_parser.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/parsing/sympy_parser.py 2023-06-29 17:42:24.574014070 -0600
@@ -627,7 +627,9 @@ def factorial_notation(tokens: List[TOKE
result: List[TOKEN] = []
nfactorial = 0
for toknum, tokval in tokens:
- if toknum == ERRORTOKEN:
+ if toknum == OP and tokval == "!":
+ nfactorial += 1
+ elif toknum == ERRORTOKEN:
op = tokval
if op == '!':
nfactorial += 1
@@ -1135,7 +1137,7 @@ class EvaluateFalseTransformer(ast.NodeT
new_node = ast.Call(
func=ast.Name(id=sympy_class, ctx=ast.Load()),
args=[left, right],
- keywords=[ast.keyword(arg='evaluate', value=ast.NameConstant(value=False, ctx=ast.Load()))],
+ keywords=[ast.keyword(arg='evaluate', value=ast.Constant(value=False, ctx=ast.Load()))],
starargs=None,
kwargs=None
)
@@ -1167,8 +1169,8 @@ class EvaluateFalseTransformer(ast.NodeT
if isinstance(node.op, ast.Sub):
right = ast.Call(
func=ast.Name(id='Mul', ctx=ast.Load()),
- args=[ast.UnaryOp(op=ast.USub(), operand=ast.Num(1)), right],
- keywords=[ast.keyword(arg='evaluate', value=ast.NameConstant(value=False, ctx=ast.Load()))],
+ args=[ast.UnaryOp(op=ast.USub(), operand=ast.Constant(1)), right],
+ keywords=[ast.keyword(arg='evaluate', value=ast.Constant(value=False, ctx=ast.Load()))],
starargs=None,
kwargs=None
)
@@ -1178,16 +1180,16 @@ class EvaluateFalseTransformer(ast.NodeT
rev = True
left = ast.Call(
func=ast.Name(id='Pow', ctx=ast.Load()),
- args=[left, ast.UnaryOp(op=ast.USub(), operand=ast.Num(1))],
- keywords=[ast.keyword(arg='evaluate', value=ast.NameConstant(value=False, ctx=ast.Load()))],
+ args=[left, ast.UnaryOp(op=ast.USub(), operand=ast.Constant(1))],
+ keywords=[ast.keyword(arg='evaluate', value=ast.Constant(value=False, ctx=ast.Load()))],
starargs=None,
kwargs=None
)
else:
right = ast.Call(
func=ast.Name(id='Pow', ctx=ast.Load()),
- args=[right, ast.UnaryOp(op=ast.USub(), operand=ast.Num(1))],
- keywords=[ast.keyword(arg='evaluate', value=ast.NameConstant(value=False, ctx=ast.Load()))],
+ args=[right, ast.UnaryOp(op=ast.USub(), operand=ast.Constant(1))],
+ keywords=[ast.keyword(arg='evaluate', value=ast.Constant(value=False, ctx=ast.Load()))],
starargs=None,
kwargs=None
)
@@ -1197,7 +1199,7 @@ class EvaluateFalseTransformer(ast.NodeT
new_node = ast.Call(
func=ast.Name(id=sympy_class, ctx=ast.Load()),
args=[left, right],
- keywords=[ast.keyword(arg='evaluate', value=ast.NameConstant(value=False, ctx=ast.Load()))],
+ keywords=[ast.keyword(arg='evaluate', value=ast.Constant(value=False, ctx=ast.Load()))],
starargs=None,
kwargs=None
)
@@ -1212,7 +1214,7 @@ class EvaluateFalseTransformer(ast.NodeT
def visit_Call(self, node):
new_node = self.generic_visit(node)
if isinstance(node.func, ast.Name) and node.func.id in self.functions:
- new_node.keywords.append(ast.keyword(arg='evaluate', value=ast.NameConstant(value=False, ctx=ast.Load())))
+ new_node.keywords.append(ast.keyword(arg='evaluate', value=ast.Constant(value=False, ctx=ast.Load())))
return new_node

View File

@ -1,51 +0,0 @@
--- sympy-sympy-1.4/sympy/utilities/autowrap.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/utilities/autowrap.py 2019-04-17 14:34:26.580374579 -0600
@@ -229,6 +229,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {cythonize_options}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
{np_import}
ext_mods = [Extension(
{ext_args},
--- sympy-sympy-1.4/sympy/utilities/_compilation/compilation.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/utilities/_compilation/compilation.py 2019-04-17 14:34:26.581374576 -0600
@@ -291,6 +291,8 @@ def simple_cythonize(src, destdir=None,
try:
cy_options = CompilationOptions(default_options)
cy_options.__dict__.update(cy_kwargs)
+ if cy_options.__dict__['language_level'] == None:
+ cy_options.__dict__['language_level'] = 3
cy_result = cy_compile([src], cy_options)
if cy_result.num_errors > 0:
raise ValueError("Cython compilation failed.")
--- sympy-sympy-1.4/sympy/utilities/tests/test_autowrap.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/utilities/tests/test_autowrap.py 2019-04-17 14:34:26.581374576 -0600
@@ -100,6 +100,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
ext_mods = [Extension(
'wrapper_module_%(num)s', ['wrapper_module_%(num)s.pyx', 'wrapped_code_%(num)s.c'],
@@ -138,6 +140,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {'compiler_directives': {'boundscheck': False}}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
ext_mods = [Extension(
'wrapper_module_%(num)s', ['wrapper_module_%(num)s.pyx', 'wrapped_code_%(num)s.c'],
@@ -164,6 +168,8 @@ except ImportError:
from distutils.extension import Extension
from Cython.Build import cythonize
cy_opts = {'compiler_directives': {'boundscheck': False}}
+if 'language_level' not in cy_opts or cy_opts['language_level'] == None:
+ cy_opts['language_level'] = 3
import numpy as np
ext_mods = [Extension(

View File

@ -1,14 +0,0 @@
--- a/sympy/polys/ring_series.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/polys/ring_series.py 2021-10-08 13:43:30.746068783 -0600
@@ -989,6 +989,11 @@ def rs_nth_root(p, n, x, prec):
except ValueError: # as exponent
raise DomainError("The given series can't be expanded in "
"this domain.")
+ except TypeError:
+ try:
+ const = R(c**QQ(1, n))
+ except ValueError:
+ raise DomainError("The given series can't be expanded in this domain.")
res = rs_nth_root(p/c, n, x, prec)*const
else:
res = _nth_root1(p, n, x, prec)

View File

@ -1,61 +0,0 @@
--- a/sympy/physics/control/tests/test_control_plots.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/physics/control/tests/test_control_plots.py 2021-10-07 16:39:20.605755393 -0600
@@ -97,12 +97,12 @@ def test_pole_zero():
assert _to_tuple(*pole_zero_numerical_data(tf2)) == \
((0.0,), ((-0.25+0.3227486121839514j), (-0.25-0.3227486121839514j)))
assert _to_tuple(*pole_zero_numerical_data(tf3)) == \
- ((0.0,), ((-0.5000000000000004+0.8660254037844395j),
- (-0.5000000000000004-0.8660254037844395j), (0.9999999999999998+0j)))
+ ((0.0,), ((-0.5+0.8660254037844389j),
+ (-0.5-0.8660254037844389j), (0.9999999999999998+0j)))
assert _to_tuple(*pole_zero_numerical_data(tf7)) == \
(((-0.6722222222222222+0.8776898690157247j), (-0.6722222222222222-0.8776898690157247j)),
- ((2.220446049250313e-16+1.2797182176061541j), (2.220446049250313e-16-1.2797182176061541j),
- (-0.7657146670186428+0.5744385024099056j), (-0.7657146670186428-0.5744385024099056j),
+ ((6.210310043996969e-16+1.2797182176061548j), (6.210310043996969e-16-1.2797182176061548j),
+ (-0.7657146670186425+0.5744385024099056j), (-0.7657146670186425-0.5744385024099056j),
(0.7657146670186427+0.5744385024099052j), (0.7657146670186427-0.5744385024099052j)))
assert _to_tuple(*pole_zero_numerical_data(ser1)) == \
((), (5.0, 0.0, 0.0, 0.0))
@@ -166,8 +166,8 @@ def test_impulse_response():
-0.037658628907103885, -0.030149507719590022, -0.021162090730736834, -0.012721292737437523))
exp3 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335, 4.444444444444445, 5.555555555555555,
6.666666666666667, 7.777777777777779, 8.88888888888889, 10.0), (4.369893391586999e-09, 1.1750333000630964,
- 3.2922404058312473, 9.432290008148343, 28.37098083007151, 86.18577464367974, 261.90356653762115,
- 795.6538758627842, 2416.9920942096983, 7342.159505206647))
+ 3.2922404058312478, 9.432290008148340, 28.37098083007151, 86.18577464367974, 261.90356653762110,
+ 795.6538758627843, 2416.9920942096987, 7342.159505206649))
exp4 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335, 4.444444444444445, 5.555555555555555,
6.666666666666667, 7.777777777777779, 8.88888888888889, 10.0), (0.0, 6.17283950617284, 24.69135802469136,
55.555555555555564, 98.76543209876544, 154.320987654321, 222.22222222222226, 302.46913580246917,
@@ -184,7 +184,7 @@ def test_impulse_response():
exp7 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335,
4.444444444444445, 5.555555555555555, 6.666666666666667, 7.777777777777779,
8.88888888888889, 10.0), (0.0, 18.934638095560974, 5346.93244680907, 1384609.8718249386,
- 358161126.65801865, 92645770015.70108, 23964739753087.42, 6198974342083139.0, 1.603492601616059e+18,
+ 358161126.65801877, 92645770015.70108, 23964739753087.418, 6198974342083139.0, 1.603492601616059e+18,
4.147764422869658e+20))
assert impulse_res_tester(tf1, exp1)
@@ -219,8 +219,8 @@ def test_step_response():
-0.003636420058445484))
exp3 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335, 4.444444444444445,
5.555555555555555, 6.666666666666667, 7.777777777777779, 8.88888888888889, 10.0),
- (0.0, 0.6314542141914303, 2.9356520038101035, 9.37731009663807, 28.452300356688376,
- 86.25721933273988, 261.9236645044672, 795.6435410577224, 2416.9786984578764, 7342.154119725917))
+ (0.0, 0.6314542141914303, 2.935652003810104, 9.377310096638068, 28.452300356688376,
+ 86.25721933273988, 261.9236645044671, 795.6435410577225, 2416.978698457877, 7342.1541197259185))
exp4 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335, 4.444444444444445,
5.555555555555555, 6.666666666666667, 7.777777777777779, 8.88888888888889, 10.0),
(0.0, 2.286236899862826, 18.28989519890261, 61.72839629629631, 146.31916159122088, 285.7796124828532,
@@ -264,8 +264,8 @@ def test_ramp_response():
1.304684417610106))
exp3 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335, 4.444444444444445, 5.555555555555555,
6.666666666666667, 7.777777777777779, 8.88888888888889, 10.0), (-3.9329040468771836e-08,
- 0.34686634635794555, 2.9998828170537903, 12.33303690737476, 40.993913948137795, 127.84145222317912,
- 391.41713691996, 1192.0006858708389, 3623.9808672503405, 11011.728034546572))
+ 0.34686634635794555, 2.9998828170537912, 12.333036907374758, 40.993913948137795, 127.84145222317912,
+ 391.41713691995994, 1192.000685870839, 3623.980867250341, 11011.728034546573))
exp4 = ((0.0, 1.1111111111111112, 2.2222222222222223, 3.3333333333333335, 4.444444444444445, 5.555555555555555,
6.666666666666667, 7.777777777777779, 8.88888888888889, 10.0), (0.0, 1.9051973784484078, 30.483158055174524,
154.32098765432104, 487.7305288827924, 1190.7483615302544, 2469.1358024691367, 4574.3789056546275,

View File

@ -1,12 +0,0 @@
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# This file is empty on purpose
addFilter(r'E: zero-length .*sympy/strategies/tests/test_strat\.py')
# There really is no documentation for the TeXmacs plugin
addFilter(r'sympy-texmacs\.noarch: W: no-documentation')
addFilter(r'sympy-texmacs\.noarch: W: no-manual-page-for-binary tm_sympy')
# We use the versions of jquery and js-underscore that sphinx gives us
addFilter(r'W: unversioned-explicit-provides bundled\((jquery|js-underscore)\)')

View File

@ -2,58 +2,72 @@
# version of Theano in Fedora. If aesara is ever packaged for Fedora, we can # version of Theano in Fedora. If aesara is ever packaged for Fedora, we can
# use it instead. # use it instead.
# We are archful (see below), but there are no ELF objects in the binary RPM.
%global debug_package %{nil}
Name: sympy Name: sympy
Version: 1.9 Version: 1.12
Release: 1%{?dist} Release: 3%{?dist}
Summary: A Python library for symbolic mathematics Summary: A Python library for symbolic mathematics
License: BSD
# The project as a whole is BSD-3-Clause.
# The files in sympy/parsing/latex are MIT.
License: BSD-3-Clause AND MIT
URL: https://sympy.org/ URL: https://sympy.org/
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
# Skip tests that require a display # Skip tests that require a display
Patch0: %{name}-circuitplot.patch Patch0: %{name}-circuitplot.patch
# Default to python3 in the Cython backend # Adapt to python 3.12
Patch1: %{name}-python3.patch Patch1: %{name}-python3.12.patch
# Work around Fedora pyglet not including PNGImageDecoder # Fix incompatible pointers, which are an error with GCC 14
# https://github.com/sympy/sympy/pull/20600 Patch2: %{name}-incompatible-pointer.patch
Patch2: %{name}-png-decoder.patch
# Account for possible rounding error in some physics tests
Patch3: %{name}-tests.patch
# Don't let deprecation warnings from distutils cause test failures
Patch4: %{name}-distutils.patch
# gmpy2 2.1.0 no longer converts Decimal directly to mpq
Patch5: %{name}-gmpy2-mpq.patch
# gmpy2 2.1.0 no longer accepts Rational as an exponent
Patch6: %{name}-rational-exponent.patch
BuildArch: noarch # This package used to be noarch, and should still be noarch. However, because
# there is no JDK available on i686 anymore, the antlr4 package is also not
# available on i686. When we can stop building on i686 altogether, we can bring
# this back. In the meantime, we cannot claim to be noarch, because the i686
# build is different from the other arches in lacking BuildRequires: antlr4.
# BuildArch: noarch
%ifarch %{java_arches}
BuildRequires: antlr4
%endif
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
BuildRequires: gettext BuildRequires: python3-devel
BuildRequires: %{py3_dist cython}
BuildRequires: %{py3_dist gmpy2}
BuildRequires: %{py3_dist llvmlite}
BuildRequires: %{py3_dist matplotlib}
BuildRequires: %{py3_dist matplotlib-inline}
BuildRequires: %{py3_dist myst-parser}
BuildRequires: %{py3_dist numexpr}
BuildRequires: python3-numpy-f2py
BuildRequires: %{py3_dist scipy}
BuildRequires: %{py3_dist wurlitzer}
# Documentation
BuildRequires: graphviz BuildRequires: graphviz
BuildRequires: ImageMagick BuildRequires: ImageMagick
BuildRequires: librsvg2-tools BuildRequires: librsvg2-tools
BuildRequires: make BuildRequires: make
BuildRequires: parallel BuildRequires: %{py3_dist furo}
BuildRequires: python3-devel BuildRequires: %{py3_dist linkify-it-py}
BuildRequires: %{py3_dist cython}
BuildRequires: %{py3_dist docutils}
BuildRequires: %{py3_dist fastcache}
BuildRequires: %{py3_dist gmpy2}
BuildRequires: %{py3_dist matplotlib}
BuildRequires: %{py3_dist mpmath} BuildRequires: %{py3_dist mpmath}
BuildRequires: %{py3_dist numexpr} BuildRequires: %{py3_dist numpydoc}
BuildRequires: %{py3_dist numpy} BuildRequires: %{py3_dist sphinx-autobuild}
BuildRequires: python3-numpy-f2py BuildRequires: %{py3_dist sphinx-copybutton}
BuildRequires: %{py3_dist pip}
BuildRequires: %{py3_dist scipy}
BuildRequires: %{py3_dist setuptools}
BuildRequires: %{py3_dist sphinx-math-dollar} BuildRequires: %{py3_dist sphinx-math-dollar}
BuildRequires: %{py3_dist wheel} BuildRequires: %{py3_dist sphinx-reredirects}
BuildRequires: %{py3_dist wurlitzer} BuildRequires: %{py3_dist sphinxcontrib-jquery}
BuildRequires: python-mpmath-doc
BuildRequires: tex(latex) BuildRequires: tex(latex)
BuildRequires: tex-dvipng BuildRequires: tex-dvipng
# Tests
BuildRequires: parallel
BuildRequires: %{py3_dist autowrap}
BuildRequires: xorg-x11-fonts-Type1 BuildRequires: xorg-x11-fonts-Type1
BuildRequires: xorg-x11-server-Xvfb BuildRequires: xorg-x11-server-Xvfb
@ -67,22 +81,21 @@ Python and does not require any external libraries.
%package -n python3-%{name} %package -n python3-%{name}
Summary: A Python3 library for symbolic mathematics Summary: A Python3 library for symbolic mathematics
Requires: mesa-libGLU
Requires: %{py3_dist cython}
Requires: %{py3_dist fastcache}
Requires: %{py3_dist gmpy2}
Requires: %{py3_dist matplotlib}
Requires: %{py3_dist pyglet}
Recommends: tex(latex) Recommends: tex(latex)
Recommends: tex(amsfonts.sty) Recommends: tex(amsfonts.sty)
Recommends: tex(amsmath.sty) Recommends: tex(amsmath.sty)
Recommends: tex(euler.sty) Recommends: tex(euler.sty)
Recommends: tex(eulervm.sty) Recommends: tex(eulervm.sty)
Recommends: tex(standalone.cls) Recommends: tex(standalone.cls)
%ifarch %{java_arches}
Recommends: %{py3_dist antlr4-python3-runtime}
%endif
Recommends: %{py3_dist cython}
Recommends: %{py3_dist gmpy2}
Recommends: %{py3_dist matplotlib}
Recommends: %{py3_dist numexpr} Recommends: %{py3_dist numexpr}
Recommends: %{py3_dist pyglet}
Recommends: %{py3_dist scipy} Recommends: %{py3_dist scipy}
Recommends: %{py3_dist theano-pymc}
# This can be removed when F38 reaches EOL # This can be removed when F38 reaches EOL
Obsoletes: sympy-texmacs < 1.8 Obsoletes: sympy-texmacs < 1.8
@ -94,6 +107,7 @@ comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries. Python and does not require any external libraries.
%package examples %package examples
License: BSD-3-Clause
Summary: Sympy examples Summary: Sympy examples
Requires: python3-%{name} = %{version}-%{release} Requires: python3-%{name} = %{version}-%{release}
@ -101,8 +115,30 @@ Requires: python3-%{name} = %{version}-%{release}
This package contains example input for sympy. This package contains example input for sympy.
%package doc %package doc
# This project is BSD-3-Clause. Other files bundled with the documentation
# have the following licenses:
# - searchindex.js: BSD-2-Clause
# - _static/basic.css: BSD-2-Clause
# - _static/clipboard.min.js: MIT
# - _static/copy*: MIT
# - _static/doctools.js: BSD-2-Clause
# - _static/graphviz.js: BSD-2-Clause
# - _static/jquery*.js: MIT
# - _static/language_data.js: BSD-2-Clause
# - _static/plot_directive.css: PSF-2.0 (see note)
# - _static/pygments.css: BSD-2-Clause
# - _static/scripts/*: MIT
# - _static/searchtools.js: BSD-2-Clause
# - _static/styles/*: MIT
# - _static/underscore*.js: MIT
#
# NOTE: The license of _static/plot_directive.css is the same as the license of
# matplotlib. The matplotlib license is functionally identical to PSF-2.0, but
# uses different organization and project names. I am using the PSF-2.0
# identifier for now, because there is no valid SPDX choice. Revisit this.
License: BSD-3-Clause AND BSD-2-Clause AND MIT AND PSF-2.0
Summary: Documentation for sympy Summary: Documentation for sympy
Provides: bundled(jquery) Provides: bundled(js-jquery)
Provides: bundled(js-underscore) Provides: bundled(js-underscore)
%description doc %description doc
@ -111,14 +147,38 @@ HTML documentation for sympy.
%prep %prep
%autosetup -p1 -n %{name}-%{name}-%{version} %autosetup -p1 -n %{name}-%{name}-%{version}
fixtimestamp() {
touch -r $1.orig $1
rm -f $1.orig
}
# Do not depend on env # Do not depend on env
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" .); do for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" .); do
sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env python,\1python3,' $fil sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env python,\1python3,' $fil
touch -r $fil.orig $fil fixtimestamp $fil
rm -f $fil.orig
done done
# Remove bogus shebangs
for fil in sympy/physics/mechanics/models.py \
sympy/physics/optics/polarization.py; do
sed -i.orig '/env python/d' $fil
fixtimestamp $fil
done
# Use local objects.inv for intersphinx
sed -e "s|\('https://mpmath\.org/doc/current/', \)None|\1'%{_docdir}/python-mpmath-doc/html/objects.inv'|" \
-i doc/src/conf.py
%generate_buildrequires
%pyproject_buildrequires
%build %build
%ifarch %{java_arches}
# Regenerate the ANTLR files
%{python3} setup.py antlr
%endif
# Build
%pyproject_wheel %pyproject_wheel
# Build the documentation # Build the documentation
@ -129,6 +189,7 @@ popd
%install %install
%pyproject_install %pyproject_install
%pyproject_save_files isympy sympy
## Remove extra files ## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test rm -f %{buildroot}%{_bindir}/{,doc}test
@ -136,6 +197,10 @@ rm -f %{buildroot}%{_bindir}/{,doc}test
# Don't let an executable script go into the documentation # Don't let an executable script go into the documentation
chmod -R a-x+X examples chmod -R a-x+X examples
# Fix permissions
chmod 0755 %{buildroot}%{python3_sitelib}/sympy/benchmarks/bench_symbench.py \
%{buildroot}%{python3_sitelib}/sympy/testing/tests/diagnose_imports.py
# Install the HTML documentation # Install the HTML documentation
mkdir -p %{buildroot}%{_docdir}/%{name}-doc mkdir -p %{buildroot}%{_docdir}/%{name}-doc
cp -a doc/_build/html %{buildroot}%{_docdir}/%{name}-doc cp -a doc/_build/html %{buildroot}%{_docdir}/%{name}-doc
@ -153,7 +218,7 @@ find examples/ -name '*.py[co]' -print -delete
# used to try to keep the test suite working on all architectures, but it has # used to try to keep the test suite working on all architectures, but it has
# become too much of a burden. Only run tests if we happen to build on x86_64. # become too much of a burden. Only run tests if we happen to build on x86_64.
# We cannot use %%ifarch here because this is a noarch package. # We cannot use %%ifarch here because this is a noarch package.
if [ "$(uname -p)" = "x86_64" ]; then if [ "$(uname -m)" = "x86_64" ]; then
# Split into many small chunks to reduce waiting in the end-game # Split into many small chunks to reduce waiting in the end-game
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3)) jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3))
@ -163,14 +228,10 @@ if [ "$(uname -p)" = "x86_64" ]; then
::: $(bash -c "echo {1..$jobs}") ::: $(bash -c "echo {1..$jobs}")
fi fi
%files -n python3-%{name} %files -n python3-%{name} -f %{pyproject_files}
%doc AUTHORS README.md %doc AUTHORS README.md
%doc doc/_build/cheatsheet/cheatsheet.pdf
%doc doc/_build/cheatsheet/combinatoric_cheatsheet.pdf %doc doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
%license LICENSE
%{python3_sitelib}/isympy.*
%{python3_sitelib}/__pycache__/isympy.*
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}.dist-info
%{_bindir}/isympy %{_bindir}/isympy
%{_mandir}/man1/isympy.1* %{_mandir}/man1/isympy.1*
@ -182,6 +243,54 @@ fi
%{_docdir}/%{name}-doc/html %{_docdir}/%{name}-doc/html
%changelog %changelog
* Thu Nov 30 2023 Jerry James <loganjerry@gmail.com> - 1.12-3
- Fix incompatible pointer types for GCC 14 compatibility
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 29 2023 Jerry James <loganjerry@gmail.com> - 1.12-1
- Version 1.12
- Add patch for python 3.12 compatibility
* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 1.11.1-5
- Rebuilt for Python 3.12
* Tue Feb 21 2023 Jerry James <loganjerry@gmail.com> - 1.11.1-4
- Fix the antlr4 Recommends (bz 2172030)
- Dynamically generate BuildRequires (to the extent possible)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Sep 27 2022 Jerry James <loganjerry@gmail.com> - 1.11.1-2
- Do not run antlr on i386 where it doesn't exist
- Be archful so we don't BR a package that doesn't exist on i386
* Tue Sep 6 2022 Jerry James <loganjerry@gmail.com> - 1.11.1-1
- Version 1.11.1
- Convert License tag to SPDX
- Drop upstreamed patches: -tests, -distutils, -signature
- Drop fastcache dependency
- Regenerate ANTLR4 files
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.10.1-2
- Rebuilt for Python 3.11
* Sat Mar 19 2022 Jerry James <loganjerry@gmail.com> - 1.10.1-1
- Version 1.10.1
* Thu Mar 17 2022 Jerry James <loganjerry@gmail.com> - 1.10-1
- Version 1.10
- Drop upstreamed patches: -python3, -png-decoder, -gmpy2-mpq,
and -rational-exponent
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Oct 8 2021 Jerry James <loganjerry@gmail.com> - 1.9-1 * Fri Oct 8 2021 Jerry James <loganjerry@gmail.com> - 1.9-1
- Version 1.9 - Version 1.9
- Drop theano support due to incompatibility with the Fedora version - Drop theano support due to incompatibility with the Fedora version