3 %bcond_without doc # HTML and PDF documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Python 2 library for symbolic mathematics
9 Summary(pl.UTF-8): Biblioteka Pythona 2 do matematyki symbolicznej
14 Group: Libraries/Python
15 #Source0Download: https://github.com/sympy/sympy/releases
16 Source0: https://github.com/sympy/sympy/releases/download/sympy-%{version}/sympy-%{version}.tar.gz
17 # Source0-md5: 478072d75b564c9356990e3027d464e6
18 Patch0: %{name}-nodisplay.patch
19 Patch1: 0001-Exception-changed-after-numpy-1.17.patch
20 Patch2: 0001-Fix-more-compatibility-issues-with-Python3.8.patch
21 Patch3: 0001-Modify-literal-comparisons-as-per-python3.8-guidelines.patch
22 Patch4: sympy-is.patch
23 URL: https://www.sympy.org/
24 BuildRequires: gettext
25 BuildRequires: graphviz
26 BuildRequires: rpmbuild(macros) >= 1.714
27 BuildRequires: sed >= 4.0
29 BuildRequires: python-devel >= 1:2.7
30 BuildRequires: python-setuptools
32 BuildRequires: python-devel-tools
33 BuildRequires: python-mpmath >= 0.19
34 BuildRequires: python-numpy
38 BuildRequires: python3-devel >= 1:3.4
39 BuildRequires: python3-setuptools
41 BuildRequires: python3-devel-tools
42 BuildRequires: python3-mpmath >= 0.19
43 BuildRequires: python3-numpy
48 BuildRequires: python3-matplotlib
49 BuildRequires: python3-mpmath >= 0.19
50 BuildRequires: sphinx-pdg-3
51 BuildRequires: texlive-format-pdflatex
52 BuildRequires: texlive-latex
53 BuildRequires: texlive-latex-ams
54 BuildRequires: texlive-latex-pgf
56 Requires: python-matplotlib
57 Requires: python-modules >= 1:2.7
58 Requires: python-mpmath
59 Requires: python-pyglet
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 SymPy aims to become a full-featured computer algebra system (CAS)
65 while keeping the code as simple as possible in order to be
66 comprehensible and easily extensible. SymPy is written entirely in
67 Python and does not require any external libraries.
69 %description -l pl.UTF-8
70 SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
71 (CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
72 rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
73 żadnych zewnętrznych bibliotek.
75 %package -n python3-sympy
76 Summary: Python 3 library for symbolic mathematics
77 Summary(pl.UTF-8): Biblioteka Pythona 3 do matematyki symbolicznej
78 Group: Libraries/Python
79 Requires: python3-matplotlib
80 Requires: python3-modules >= 1:3.4
81 Requires: python3-mpmath
82 Requires: python3-pyglet
84 %description -n python3-sympy
85 SymPy aims to become a full-featured computer algebra system (CAS)
86 while keeping the code as simple as possible in order to be
87 comprehensible and easily extensible. SymPy is written entirely in
88 Python and does not require any external libraries.
90 %description -n python3-sympy -l pl.UTF-8
91 SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
92 (CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
93 rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
94 żadnych zewnętrznych bibliotek.
97 Summary: Documentation for SymPy module
98 Summary(pl.UTF-8): Dokumentacja do SymPy
102 HTML documentation for SymPy.
104 %description doc -l pl.UTF-8
105 Dokumentacja do SymPy w formacie HTML.
108 %setup -q -n sympy-%{version}
117 %py_build %{?with_tests:test}
121 %py3_build %{?with_tests:test}
125 pydir=$(pwd)/build-3/lib
129 SPHINXBUILD=sphinx-build-3
134 rm -rf $RPM_BUILD_ROOT
139 %{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
141 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
142 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
143 find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
144 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
152 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
153 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
154 find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
155 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
159 rm -rf $RPM_BUILD_ROOT
163 %defattr(644,root,root,755)
164 %doc AUTHORS LICENSE README.rst
165 %attr(755,root,root) %{_bindir}/isympy
166 %{py_sitescriptdir}/isympy.py[co]
167 %{py_sitescriptdir}/sympy
168 %{py_sitescriptdir}/sympy-%{version}-*.egg-info
169 %{_mandir}/man1/isympy.1*
170 %{_examplesdir}/%{name}-%{version}
174 %files -n python3-sympy
175 %defattr(644,root,root,755)
176 %doc AUTHORS LICENSE README.rst
177 %attr(755,root,root) %{_bindir}/isympy3
178 %{py3_sitescriptdir}/isympy.py
179 %{py3_sitescriptdir}/__pycache__/isympy.cpython-*.py[co]
180 %{py3_sitescriptdir}/sympy
181 %{py3_sitescriptdir}/sympy-%{version}-*.egg-info
182 %{_examplesdir}/python3-sympy-%{version}
187 %defattr(644,root,root,755)
188 %doc doc/_build/html/* doc/_build/cheatsheet/cheatsheet.pdf