Compare commits

..

45 Commits
f30 ... 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
Jerry James
7037317356 Version 1.9.
- Drop theano support due to incompatibility with the Fedora version.
- Add -tests, -distutils, -gmpy2-mpq, and -rational-exponent patches to
  work around test failures.
2021-10-08 14:57:59 -06:00
Fedora Release Engineering
aeacf02e35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 18:44:22 +00:00
Miro Hrončok
6e81534abc Drop extra ~bootstrap from the release number, was sympy-1.8-2.fc35~bootstrap~bootstrap
%{?dist} already includes ~bootstrap if %with bootstrap.
2021-06-10 20:19:36 +02:00
Zbigniew Jędrzejewski-Szmek
4a5d1a97e3 Build in bootstrap mode 2021-06-10 15:21:43 +02:00
Zbigniew Jędrzejewski-Szmek
4f184ff324 Allow building in bootstrap mode: without theano
Theano currently ftbfs (segv in tests), and the dependency is only Recommends
in binary packages, so allow building w/o it.
2021-06-10 14:58:47 +02:00
Python Maint
187002e39d Rebuilt for Python 3.10 2021-06-04 21:16:06 +02:00
Jerry James
39a9cfc04c Version 1.8.
- Drop the -float patch and only run tests on x86_64.
- Add -circuitplot patch to skip tests that fail with no display.
- Drop the -texmacs subpackage; the TeXmacs package ships its own sympy plugin.
2021-04-12 15:10:56 -06:00
Fedora Release Engineering
1d0d8a3bc2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 21:28:49 +00:00
Petr Viktorin
e3481ee098 Do not force a Pyglet image decoder for preview 2020-12-14 11:13:05 +01:00
Jerry James
f3a1574fa3 Version 1.7.1. 2020-12-12 19:16:20 -07:00
Jerry James
fd6694989d Fix preview of PNG images (bz 1906363).
Add missing Recommends needed to preview images (bz 1906363).
2020-12-10 12:10:25 -07:00
Jerry James
3f327dec4e Version 1.7. 2020-11-29 11:45:25 -07:00
Jerry James
c4a0b40a3a Add -theano-pymc patch to adapt. 2020-11-26 09:24:34 -07:00
Jerry James
5997950515 Update Theano dependency for Theano-PyMC. 2020-11-26 07:02:35 -07:00
Jerry James
9d5dcfb5a0 Explicitly BR make. 2020-11-09 21:15:57 -07:00
Jerry James
659c9df0da Version 1.6.2. 2020-08-10 21:52:41 -06:00
Fedora Release Engineering
e245106a60 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 11:57:21 +00:00
Jerry James
eebbf2b256 Version 1.6.1. Drop upstreamed -ast patch. 2020-07-02 15:38:42 -06:00
Jerry James
8caa98c2cd Add setuptools BR. Add -ast patch to fix compilation with python 3.9. 2020-06-24 10:03:43 -06:00
Jerry James
1a00222e57 Cannot use %ifnarch in a noarch package; check int size instead. 2020-05-29 16:04:05 -06:00
Jerry James
655cd53030 Disable testing on 32-bit systems; too many tests need 64-bit integers. 2020-05-29 14:50:58 -06:00
Jerry James
53a6ccd846 Version 1.6. Drop upstreamed -doc and -sample-set patches. 2020-05-29 13:53:50 -06:00
Miro Hrončok
e3f48f62c3 Rebuilt for Python 3.9 2020-05-26 03:51:25 +02:00
Jerry James
378dc570ec Add -sample-set patch to fix test failure with python 3.9 (bz 1830943) 2020-05-11 08:36:50 -06:00
Fedora Release Engineering
42ff37cfe1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 00:54:28 +00:00
Jerry James
ae96c84613 Update to 1.5.1.
Also:
- Drop upstreamed patches.
- Drop upstreamed workaround for numpy with a release candidate version.
2020-01-08 19:22:18 -07:00
Jerry James
0b31cd7ed0 Fix broken dependencies in the -texmacs subpackage.
Recommend numexpr.
2019-11-04 10:45:58 -07:00
Jerry James
d03ed1f329 Add one more patch to fix a python 3.8 warning. 2019-09-13 12:58:19 -06:00
Robert-André Mauchin
7bb3831609 Add patches to fix build with Python 3.8 and Numpy 1.17
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2019-08-24 16:24:31 +02:00
Miro Hrončok
24fe7598b1 Rebuilt for Python 3.8 2019-08-19 11:06:36 +02:00
Fedora Release Engineering
f7ccdc771a - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 00:47:56 +00:00
10 changed files with 447 additions and 209 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# sympy
SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as
simple as possible in order to be comprehensible and easily extensible.
SymPy is written entirely in Python.
See [the home page](https://www.sympy.org/) for more information.

View File

@ -1 +1 @@
SHA512 (sympy-1.4.tar.gz) = fdf2113478393ac71c08a440c97ded1d11e2cb630da237a4e32d03a54fda1bb51c6317a757e5d51683fc1ff7ed865cf3b4c02927bec5974eb68bacc5b88f865a SHA512 (sympy-1.12.tar.gz) = 96a89b88f6912d70c56f5bd1903dd3c518963118ff25d033cdcb7da2f260b8ee209d3ab4a4394dd2b5dc0b4585b71ccd55d55c8e5c6e28024cccbedf07ee4360

13
sympy-circuitplot.patch Normal file
View File

@ -0,0 +1,13 @@
--- sympy-sympy-1.8/sympy/physics/quantum/tests/test_circuitplot.py.orig 2021-04-09 16:29:50.000000000 -0600
+++ sympy-sympy-1.8/sympy/physics/quantum/tests/test_circuitplot.py 2021-04-12 13:27:55.241417177 -0600
@@ -4,7 +4,9 @@ from sympy.physics.quantum.gate import C
from sympy.external import import_module
from sympy.testing.pytest import skip
-mpl = import_module('matplotlib')
+mpl = import_module(
+ 'matplotlib', import_kwargs={'fromlist': ['pyplot']},
+ catch=(RuntimeError,)) # This is raised in environments that have no display.
def test_render_label():
assert render_label('q0') == r'$\left|q0\right\rangle$'

View File

@ -1,11 +0,0 @@
--- sympy-sympy-1.4/README.rst.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/README.rst 2019-04-17 14:31:01.408877172 -0600
@@ -240,7 +240,7 @@ To cite SymPy in publications use
A BibTeX entry for LaTeX users is
-.. code-block:: none
+.. code-block:: BibTeX
@article{10.7717/peerj-cs.103,
title = {SymPy: symbolic computing in Python},

View File

@ -1,36 +0,0 @@
--- sympy-sympy-1.4/sympy/core/tests/test_numbers.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/core/tests/test_numbers.py 2019-04-17 19:54:46.128555214 -0600
@@ -1860,11 +1860,6 @@ def test_numpy_to_float():
check_prec_and_relerr(np.float16(2.0/3), S(2)/3)
check_prec_and_relerr(np.float32(2.0/3), S(2)/3)
check_prec_and_relerr(np.float64(2.0/3), S(2)/3)
- # extended precision, on some arch/compilers:
- x = np.longdouble(2)/3
- check_prec_and_relerr(x, S(2)/3)
- y = Float(x, precision=10)
- assert same_and_same_prec(y, Float(S(2)/3, precision=10))
raises(TypeError, lambda: Float(np.complex64(1+2j)))
raises(TypeError, lambda: Float(np.complex128(1+2j)))
--- sympy-sympy-1.4/sympy/core/tests/test_sympify.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/core/tests/test_sympify.py 2019-04-17 14:29:48.765055139 -0600
@@ -590,8 +590,6 @@ def test_sympify_numpy():
assert equal(sympify(np.float32(1.123456)), Float(1.123456, precision=24))
assert equal(sympify(np.float64(1.1234567891234)),
Float(1.1234567891234, precision=53))
- assert equal(sympify(np.longdouble(1.123456789)),
- Float(1.123456789, precision=80))
assert equal(sympify(np.complex64(1 + 2j)), S(1.0 + 2.0*I))
assert equal(sympify(np.complex128(1 + 2j)), S(1.0 + 2.0*I))
assert equal(sympify(np.longcomplex(1 + 2j)), S(1.0 + 2.0*I))
@@ -600,10 +598,6 @@ def test_sympify_numpy():
if hasattr(np, 'float96'):
assert equal(sympify(np.float96(1.123456789)),
Float(1.123456789, precision=80))
- #float128 does not exist on all platforms
- if hasattr(np, 'float128'):
- assert equal(sympify(np.float128(1.123456789123)),
- Float(1.123456789123, precision=80))
@XFAIL

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];

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
@@ -228,6 +228,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
@@ -292,6 +292,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,11 +0,0 @@
--- sympy-sympy-1.4/sympy/core/sympify.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/core/sympify.py 2019-04-17 14:36:06.028059616 -0600
@@ -382,7 +382,7 @@ def sympify(a, locals=None, convert_xor=
try:
a = a.replace('\n', '')
expr = parse_expr(a, local_dict=locals, transformations=transformations, evaluate=evaluate)
- except (TokenError, SyntaxError) as exc:
+ except (TokenError, SyntaxError, TypeError) as exc:
raise SympifyError('could not parse %r' % a, exc)
return expr

View File

@ -1,44 +1,73 @@
# We used to build with Theano support. However, we no longer have a compatible
# version of Theano in Fedora. If aesara is ever packaged for Fedora, we can
# 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.4 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
URL: http://sympy.org/ # 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/
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
# Remove tests that fail on non-x86 architectures # Skip tests that require a display
Patch0: %{name}-float.patch Patch0: %{name}-circuitplot.patch
# Fix a documentation typo # Adapt to python 3.12
Patch1: %{name}-doc.patch Patch1: %{name}-python3.12.patch
# Default to python3 in the Cython backend # Fix incompatible pointers, which are an error with GCC 14
Patch2: %{name}-python3.patch Patch2: %{name}-incompatible-pointer.patch
# Convert TypeError to SympifyError inside sympify()
Patch3: %{name}-sympify.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: parallel BuildRequires: make
BuildRequires: procps BuildRequires: %{py3_dist furo}
BuildRequires: python3-devel BuildRequires: %{py3_dist linkify-it-py}
BuildRequires: python3dist(cython) BuildRequires: %{py3_dist mpmath}
BuildRequires: python3dist(docutils) BuildRequires: %{py3_dist numpydoc}
BuildRequires: python3dist(fastcache) BuildRequires: %{py3_dist sphinx-autobuild}
BuildRequires: python3dist(gmpy2) BuildRequires: %{py3_dist sphinx-copybutton}
BuildRequires: python3dist(matplotlib) BuildRequires: %{py3_dist sphinx-math-dollar}
BuildRequires: python3dist(mpmath) BuildRequires: %{py3_dist sphinx-reredirects}
BuildRequires: python3dist(numpy) BuildRequires: %{py3_dist sphinxcontrib-jquery}
BuildRequires: python3-numpy-f2py BuildRequires: python-mpmath-doc
BuildRequires: python3dist(scipy)
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(theano)
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
@ -52,19 +81,24 @@ 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 Recommends: tex(latex)
Requires: python3dist(cython) Recommends: tex(amsfonts.sty)
Requires: python3dist(fastcache) Recommends: tex(amsmath.sty)
Requires: python3dist(gmpy2) Recommends: tex(euler.sty)
Requires: python3dist(matplotlib) Recommends: tex(eulervm.sty)
Requires: python3dist(pyglet) 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 pyglet}
Recommends: %{py3_dist scipy}
Recommends: python3dist(scipy) # This can be removed when F38 reaches EOL
Recommends: python3dist(theano) Obsoletes: sympy-texmacs < 1.8
# This can be removed when F29 reaches EOL
Obsoletes: python2-%{name} < 1.3
Provides: python2-%{name} = %{version}-%{release}
%description -n python3-%{name} %description -n python3-%{name}
SymPy aims to become a full-featured computer algebra system (CAS) SymPy aims to become a full-featured computer algebra system (CAS)
@ -72,15 +106,8 @@ while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in 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 texmacs
Summary: TeXmacs integration for sympy
Requires: %{name} = %{version}-%{release}
Requires: texmacs
%description texmacs
This package contains a TeXmacs plugin for sympy.
%package examples %package examples
License: BSD-3-Clause
Summary: Sympy examples Summary: Sympy examples
Requires: python3-%{name} = %{version}-%{release} Requires: python3-%{name} = %{version}-%{release}
@ -88,8 +115,31 @@ 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)
%description doc %description doc
HTML documentation for sympy. HTML documentation for sympy.
@ -97,52 +147,59 @@ HTML documentation for sympy.
%prep %prep
%autosetup -p1 -n %{name}-%{name}-%{version} %autosetup -p1 -n %{name}-%{name}-%{version}
# If running on a 32-bit system, disable a test that requires 64-bit integers. fixtimestamp() {
%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)') touch -r $1.orig $1
if [ "%{maxpyint}" = "7fffffff" ]; then rm -f $1.orig
sed -i '/issue 6393/,/assert b == -d/d' sympy/polys/tests/test_rootoftools.py }
fi
# Allow building with a numpy that has a release candidate version number
sed -i 's/StrictVersion/LooseVersion/g' sympy/external/importtools.py
# 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
%py3_build %ifarch %{java_arches}
# Regenerate the ANTLR files
%{python3} setup.py antlr
%endif
# Build
%pyproject_wheel
# Build the documentation # Build the documentation
pushd doc pushd doc
sed -i 's/sphinx-build/&-%{python3_version}/' Makefile make html SPHINXOPTS=%{?_smp_mflags} PYTHON=%{python3}
make html SPHINXOPTS=%{?_smp_mflags} PYTHON=%{__python3}
make cheatsheet make cheatsheet
popd popd
%install %install
%py3_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
## Install the TeXmacs integration
sed 's/python/python3/' data/TeXmacs/bin/tm_sympy > \
%{buildroot}%{_bindir}/tm_sympy
chmod a+x %{buildroot}%{_bindir}/tm_sympy
touch -r data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir}/tm_sympy
mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
chmod a-x %{buildroot}%{_datadir}/TeXmacs/plugins/sympy/progs/*.scm
# 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
# Convert the README to HTML # Fix permissions
rst2html --no-datestamp README.rst README.html 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
@ -153,38 +210,31 @@ rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
# Try to get rid of pyc files, which aren't useful for documentation # Try to get rid of pyc files, which aren't useful for documentation
find examples/ -name '*.py[co]' -print -delete find examples/ -name '*.py[co]' -print -delete
# Fix some executable bits
chmod a+x \
%{buildroot}%{python3_sitelib}/sympy/benchmarks/bench_symbench.py \
%{buildroot}%{python3_sitelib}/sympy/physics/mechanics/models.py \
%{buildroot}%{python3_sitelib}/sympy/utilities/tests/diagnose_imports.py
%check %check
let "dnum = $RANDOM % 90 + 10" # Many tests assume they are running on an x86_64 machine. Some assume that
# Split into many small chunks to reduce waiting in the end-game # native 64-bit integers are available. Some assume that 80-bit floating point
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3)) # numbers are available. Some assume that certain operations always produce
# numpy float64 values (but produce float32 values on some architectures). I
# 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.
# We cannot use %%ifarch here because this is a noarch package.
if [ "$(uname -m)" = "x86_64" ]; then
# Split into many small chunks to reduce waiting in the end-game
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3))
xvfb-run -a -n $dnum \ xvfb-run -d \
parallel %{?_smp_mflags} \ parallel %{?_smp_mflags} \
%{__python3} bin/test -v --split {}/$jobs \ %{python3} bin/test -v --split {}/$jobs \
::: $(bash -c "echo {1..$jobs}") ::: $(bash -c "echo {1..$jobs}")
fi
%files -n python3-%{name} %files -n python3-%{name} -f %{pyproject_files}
%doc AUTHORS CODE_OF_CONDUCT.md README.html %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}-*.egg-info
%{_bindir}/isympy %{_bindir}/isympy
%{_mandir}/man1/isympy.1* %{_mandir}/man1/isympy.1*
%files texmacs
%license data/TeXmacs/LICENSE
%{_bindir}/tm_sympy
%{_datadir}/TeXmacs/plugins/sympy/
%files examples %files examples
%doc examples/* %doc examples/*
@ -193,6 +243,141 @@ xvfb-run -a -n $dnum \
%{_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
- Version 1.9
- Drop theano support due to incompatibility with the Fedora version
- Add -tests, -distutils, -gmpy2-mpq, and -rational-exponent patches to
work around test failures
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 10 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.8-2~bootstrap
- Build in bootstrap mode to work-around missing theano
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.8-2
- Rebuilt for Python 3.10
* Mon Apr 12 2021 Jerry James <loganjerry@gmail.com> - 1.8-1
- Version 1.8
- Drop the -float patch and only run tests on x86_64
- Add -circuitplot patch to skip tests that fail with no display
- Drop the -texmacs subpackage; the TeXmacs package ships its own sympy plugin
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Dec 12 2020 Jerry James <loganjerry@gmail.com> - 1.7.1-1
- Version 1.7.1
* Thu Dec 10 2020 Jerry James <loganjerry@gmail.com> - 1.7-2
- Fix preview of PNG images (bz 1906363)
- Add missing Recommends needed to preview images (bz 1906363)
* Sat Nov 28 2020 Jerry James <loganjerry@gmail.com> - 1.7-1
- Version 1.7
* Thu Nov 26 2020 Jerry James <loganjerry@gmail.com> - 1.6.2-2
- Update Theano dependency for Theano-PyMC
- Add -theano-pymc patch to adapt
* Mon Aug 10 2020 Jerry James <loganjerry@gmail.com> - 1.6.2-1
- Version 1.6.2
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 2 2020 Jerry James <loganjerry@gmail.com> - 1.6.1-1
- Version 1.6.1
- Drop upstreamed -ast patch
* Wed Jun 24 2020 Jerry James <loganjerry@gmail.com> - 1.6-2
- Add setuptools BR
- Add -ast patch to fix compilation with python 3.9
* Fri May 29 2020 Jerry James <loganjerry@gmail.com> - 1.6-1
- Version 1.6
- Drop upstreamed -doc and -sample-set patches
- Disable testing on 32-bit systems; too many tests need 64-bit integers
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.5.1-4
- Rebuilt for Python 3.9
* Mon May 11 2020 Jerry James <loganjerry@gmail.com> - 1.5.1-3
- Add -sample-set patch to fix test failure with python 3.9
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 8 2020 Jerry James <loganjerry@gmail.com> - 1.5.1-1
- Update to 1.5.1
- Drop upstreamed patches
- Drop upstreamed workaround for numpy with a release candidate version
* Mon Nov 4 2019 Jerry James <loganjerry@gmail.com> - 1.4-6
- Fix broken dependencies in the -texmacs subpackage
- Recommend numexpr
* Fri Sep 13 2019 Jerry James <loganjerry@gmail.com> - 1.4-5
- Add one more patch to fix a python 3.8 warning
* Sat Aug 24 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-4
- Add patches to fix build with Python 3.8 and Numpy 1.17
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4-3
- Rebuilt for Python 3.8
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 17 2019 Jerry James <loganjerry@gmail.com> - 1.4-1 * Wed Apr 17 2019 Jerry James <loganjerry@gmail.com> - 1.4-1
- Update to 1.4 - Update to 1.4
- Drop -factorial patch - Drop -factorial patch