Compare commits

...

64 Commits
f27 ... 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
Jerry James ef648a6f1d Disable more tests that fail on non-x86. 2019-04-17 19:55:21 -06:00
Jerry James 01ee18672a Update to 1.4. Drop -factorial patch. 2019-04-17 19:14:40 -06:00
Fedora Release Engineering 9bf77eb378 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 09:12:39 +00:00
Jerry James fde3ce2066 Add -sympify and -factorial patches to work around test failures. 2019-01-30 19:03:04 -07:00
Jerry James f014928df3 Drop Requires from the -doc subpackage (bz 1665767). 2019-01-14 20:58:39 -07:00
Jerry James cbc69b9ce4 Update to 1.3.
Also:
- Drop upstreamed patches: subexpr-lambdify, test-code-quality, tex-encoding.
- Drop the python2 subpackage.
- Add -python3 patch to ask cython to generate python 3 code.
2018-10-13 13:34:09 -06:00
Miro Hrončok 5125b8335b Fix encoding of TeX source file 2018-08-14 13:40:36 +02:00
Miro Hrončok a4a28fcb15 Fix _subexpr method in lambdify 2018-08-14 12:50:22 +02:00
Jerry James 8e1b0e24f1 Update to 1.2 (bz 1599502).
Also:
- Drop upstreamed -python3 patch.
- Add -test-code-quality and -doc patches.
2018-07-21 11:18:46 -06:00
Fedora Release Engineering ea0405dcd2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 07:07:57 +00:00
Jerry James d53dd55d34 Do not invoke unversioned python. 2018-07-04 21:40:53 -06:00
Jerry James 16724183cd Adapt to more changes in python 3.7. 2018-06-27 22:02:27 -06:00
Jerry James be6d2913d6 Adapt to changes in python 3.7. 2018-06-27 07:21:49 -06:00
Miro Hrončok fca15a416a Rebuilt for Python 3.7 2018-06-19 11:28:03 +02:00
Iryna Shcherbina d1f53a279f Update Python 2 dependency declarations to new packaging standards 2018-02-21 07:55:26 +01:00
Jerry James e942db7410 Disable 80-bit long double test on non-i686 arches. 2018-02-19 09:05:22 -07:00
Jerry James 46118a3192 Fix two broken tests that cause FTBFS. 2018-02-18 21:54:41 -07:00
Fedora Release Engineering d3f3fa398b - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 18:16:46 +00:00
Zbigniew Jędrzejewski-Szmek 5abf2c8938 Python 2 binary package renamed to python2-sympy 2017-08-19 09:44:13 -04:00
7 changed files with 506 additions and 163 deletions

5
.gitignore vendored
View File

@ -1,4 +1 @@
/sympy-0.7.6.1.tar.gz
/sympy-1.0.tar.gz
/sympy-1.1.tar.gz
/sympy-1.1.1.tar.gz
/sympy-*.tar.gz

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.1.1.tar.gz) = c571a5c6fd0abb59e60baec0f9c7b909ec2d133db52353c58288f7477ac2bc905219b308122761e41509d4bbdfc145375bdc6f76f608eb557e44163bb37b111a
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

@ -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,62 +1,104 @@
# 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
Version: 1.1.1
Release: 1%{?dist}
Version: 1.12
Release: 3%{?dist}
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
# Skip tests that require a display
Patch0: %{name}-circuitplot.patch
# Adapt to python 3.12
Patch1: %{name}-python3.12.patch
# Fix incompatible pointers, which are an error with GCC 14
Patch2: %{name}-incompatible-pointer.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-c++
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: ImageMagick
BuildRequires: librsvg2-tools
BuildRequires: numpy python3-numpy
BuildRequires: numpy-f2py python3-numpy-f2py
BuildRequires: python2-devel python3-devel
BuildRequires: python2-docutils
BuildRequires: python2-fastcache python3-fastcache
BuildRequires: python2-gmpy2 python3-gmpy2
BuildRequires: python2-matplotlib python3-matplotlib
BuildRequires: python-mpmath python3-mpmath
BuildRequires: python2-scipy python3-scipy
BuildRequires: python3-sphinx
BuildRequires: python2-theano python3-theano
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
# Tests
BuildRequires: parallel
BuildRequires: %{py3_dist autowrap}
BuildRequires: xorg-x11-fonts-Type1
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: parallel
Requires: mesa-libGLU
Requires: python2-fastcache
Requires: python2-gmpy2
Requires: python2-matplotlib
Requires: python-mpmath
Requires: python-pyglet
Recommends: python2-scipy
Recommends: python2-theano
%description
SymPy 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
%global _description\
SymPy 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 and does not require any external libraries.
%description %_description
%package -n python3-%{name}
Summary: A Python3 library for symbolic mathematics
Requires: mesa-libGLU
Requires: python3-fastcache
Requires: python3-gmpy2
Requires: python3-matplotlib
Requires: python3-mpmath
Requires: python3-pyglet
Recommends: tex(latex)
Recommends: tex(amsfonts.sty)
Recommends: tex(amsmath.sty)
Recommends: tex(euler.sty)
Recommends: tex(eulervm.sty)
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: python3-scipy
Recommends: python3-theano
# This can be removed when F38 reaches EOL
Obsoletes: sympy-texmacs < 1.8
%description -n python3-%{name}
SymPy aims to become a full-featured computer algebra system (CAS)
@ -64,180 +106,322 @@ while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in
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
License: BSD-3-Clause
Summary: Sympy examples
Requires: %{name} = %{version}-%{release}
# once rich dependencies are allowed, add "or python3-sympy = %%{version}-%%{release}"
Requires: python3-%{name} = %{version}-%{release}
%description examples
This package contains example input for sympy.
%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
Requires: %{name} = %{version}-%{release}
Provides: bundled(jquery)
Provides: bundled(js-jquery)
Provides: bundled(js-underscore)
%description doc
HTML documentation for sympy.
%global sympydir %{name}-%{name}-%{version}
%prep
%setup -q -c
%autosetup -p1 -n %{name}-%{name}-%{version}
# If running on a 32-bit system, disable a test that requires 64-bit integers.
%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)')
if [ "%{maxpyint}" = "7fffffff" ]; then
sed -i '/issue 6393/,/assert b == -d/d' \
%{sympydir}/sympy/polys/tests/test_rootoftools.py
fi
# Make a copy for building the python3 version
cp -a %{sympydir} python3
fixtimestamp() {
touch -r $1.orig $1
rm -f $1.orig
}
# Do not depend on env
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" %{sympydir}); do
sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env python,\1python2,' $fil
touch -r $fil.orig $fil
rm -f $fil.orig
done
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" python3); do
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" .); do
sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env python,\1python3,' $fil
touch -r $fil.orig $fil
rm -f $fil.orig
fixtimestamp $fil
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 the python2 version
pushd %{sympydir}
%py2_build
popd
%ifarch %{java_arches}
# Regenerate the ANTLR files
%{python3} setup.py antlr
%endif
# Build the python3 version
pushd python3
%py3_build
popd
# Build
%pyproject_wheel
# Build the documentation
pushd %{sympydir}/doc
sed -i 's/sphinx-build/&-%{python3_version}/' Makefile
make html SPHINXOPTS=%{?_smp_mflags}
make cheatsheet
popd
pushd python3/doc
pushd doc
make html SPHINXOPTS=%{?_smp_mflags} PYTHON=%{python3}
make cheatsheet
popd
%install
# Install the python3 version
pushd python3
%py3_install
mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy
mv %{buildroot}%{_mandir}/man1/isympy.1 \
%{buildroot}%{_mandir}/man1/python3-isympy.1
popd
# Install the python2 version
pushd %{sympydir}
%py2_install
popd
%pyproject_install
%pyproject_save_files isympy sympy
## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test
## Install the TeXmacs integration
pushd %{sympydir}
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
chmod -R a-x+X examples
# Convert the README to HTML
rst2html --no-datestamp README.rst README.html
# 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
mkdir -p %{buildroot}%{_docdir}/%{name}-doc
cp -a doc/_build/html %{buildroot}%{_docdir}/%{name}-doc
rm -f %{buildroot}%{_docdir}/%{name}-doc/html/.buildinfo
rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
popd
# Try to get rid of pyc files, which aren't useful for documentation
find %{sympydir}/examples/ -name '*.py[co]' -print -delete
# Fix some executable bits
chmod a+x \
%{buildroot}%{python2_sitelib}/sympy/benchmarks/bench_symbench.py \
%{buildroot}%{python2_sitelib}/sympy/physics/mechanics/models.py \
%{buildroot}%{python2_sitelib}/sympy/utilities/tests/diagnose_imports.py \
%{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
find examples/ -name '*.py[co]' -print -delete
%check
let "dnum = $RANDOM % 90 + 10"
# Split into many small chunks to reduce waiting in the end-game
jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3))
# Many tests assume they are running on an x86_64 machine. Some assume that
# native 64-bit integers are available. Some assume that 80-bit floating point
# 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))
pushd %{sympydir}
xvfb-run -a -n $dnum \
parallel %{?_smp_mflags} \
%{__python2} bin/test -v --split {}/$jobs \
::: $(bash -c "echo {1..$jobs}")
popd
xvfb-run -d \
parallel %{?_smp_mflags} \
%{python3} bin/test -v --split {}/$jobs \
::: $(bash -c "echo {1..$jobs}")
fi
pushd python3
xvfb-run -a -n $dnum \
parallel %{?_smp_mflags} \
%{__python3} bin/test -v --split {}/$jobs \
::: $(bash -c "echo {1..$jobs}")
popd
%files
%doc %{sympydir}/AUTHORS %{sympydir}/CODE_OF_CONDUCT.md %{sympydir}/README.html
%doc %{sympydir}/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
%license %{sympydir}/LICENSE
%{python2_sitelib}/sympy/
%{python2_sitelib}/sympy-%{version}-*.egg-info
%files -n python3-%{name} -f %{pyproject_files}
%doc AUTHORS README.md
%doc doc/_build/cheatsheet/cheatsheet.pdf
%doc doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
%files -n python3-%{name}
%doc python3/AUTHORS python3/CODE_OF_CONDUCT.md %{sympydir}/README.html
%doc python3/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
%license python3/LICENSE
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/python3-isympy
%{_mandir}/man1/python3-isympy.1*
%files texmacs
%license %{sympydir}/data/TeXmacs/LICENSE
%{_bindir}/tm_sympy
%{_datadir}/TeXmacs/plugins/sympy/
%files examples
%doc %{sympydir}/examples/*
%doc examples/*
%files doc
%docdir %{_docdir}/%{name}-doc/html
%{_docdir}/%{name}-doc/html
%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
- Update to 1.4
- Drop -factorial patch
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 30 2019 Jerry James <loganjerry@gmail.com> - 1.3-2
- Add -sympify and -factorial patches to work around test failures
* Mon Jan 14 2019 Jerry James <loganjerry@gmail.com> - 1.3-2
- Drop Requires from the -doc subpackage (bz 1665767)
* Sat Oct 6 2018 Jerry James <loganjerry@gmail.com> - 1.3-1
- Update to 1.3
- Drop upstreamed patches: subexpr-lambdify, test-code-quality, tex-encoding
- Drop the python2 subpackage
- Add -python3 patch to ask cython to generate python 3 code
* Tue Aug 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2-2
- Fix _subexpr method in lambdify
* Sat Jul 21 2018 Jerry James <loganjerry@gmail.com> - 1.2-1
- Update to 1.2 (bz 1599502)
- Drop upstreamed -python3 patch
- Add -test-code-quality and -doc patches
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.1-5
- Rebuilt for Python 3.7
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.1-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.1-2
- Python 2 binary package renamed to python2-sympy
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Jerry James <loganjerry@gmail.com> - 1.1.1-1
- Update to 1.1.1 (bz 1468405)