diff --git a/sources b/sources index 5a17d11..95d930c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sympy-1.11.1.tar.gz) = 6cc720b673cf31a2e8f56a5cae24ec15024ea43dee92196adb0a87f28561b5d2404fbbfd3d55a8414930a31d4d0f4a731d458ad528c8cbb03c37555f5c14ce4a +SHA512 (sympy-1.12.tar.gz) = 96a89b88f6912d70c56f5bd1903dd3c518963118ff25d033cdcb7da2f260b8ee209d3ab4a4394dd2b5dc0b4585b71ccd55d55c8e5c6e28024cccbedf07ee4360 diff --git a/sympy-python3.12.patch b/sympy-python3.12.patch new file mode 100644 index 0000000..5c4a874 --- /dev/null +++ b/sympy-python3.12.patch @@ -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 + + diff --git a/sympy.spec b/sympy.spec index af232d5..cb1b732 100644 --- a/sympy.spec +++ b/sympy.spec @@ -6,8 +6,8 @@ %global debug_package %{nil} Name: sympy -Version: 1.11.1 -Release: 5%{?dist} +Version: 1.12 +Release: 1%{?dist} Summary: A Python library for symbolic mathematics # The project as a whole is BSD-3-Clause. @@ -17,6 +17,8 @@ URL: https://sympy.org/ Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz # Skip tests that require a display Patch0: %{name}-circuitplot.patch +# Adapt to python 3.12 +Patch1: %{name}-python3.12.patch # 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 @@ -36,6 +38,7 @@ 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 @@ -49,10 +52,14 @@ BuildRequires: librsvg2-tools BuildRequires: make BuildRequires: %{py3_dist furo} BuildRequires: %{py3_dist linkify-it-py} +BuildRequires: %{py3_dist mpmath} BuildRequires: %{py3_dist numpydoc} +BuildRequires: %{py3_dist sphinx-autobuild} BuildRequires: %{py3_dist sphinx-copybutton} BuildRequires: %{py3_dist sphinx-math-dollar} BuildRequires: %{py3_dist sphinx-reredirects} +BuildRequires: %{py3_dist sphinxcontrib-jquery} +BuildRequires: python-mpmath-doc BuildRequires: tex(latex) BuildRequires: tex-dvipng @@ -156,6 +163,10 @@ for fil in sympy/physics/mechanics/models.py \ 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 @@ -230,6 +241,10 @@ fi %{_docdir}/%{name}-doc/html %changelog +* Thu Jun 29 2023 Jerry James - 1.12-1 +- Version 1.12 +- Add patch for python 3.12 compatibility + * Thu Jun 29 2023 Python Maint - 1.11.1-5 - Rebuilt for Python 3.12