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 URL: https://www.sympy.org/
20 BuildRequires: gettext
21 BuildRequires: graphviz
22 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: sed >= 4.0
25 BuildRequires: python-devel >= 1:2.7
26 BuildRequires: python-setuptools
28 BuildRequires: python-devel-tools
29 BuildRequires: python-mpmath >= 0.19
30 BuildRequires: python-numpy
34 BuildRequires: python3-devel >= 1:3.4
35 BuildRequires: python3-setuptools
37 BuildRequires: python3-devel-tools
38 BuildRequires: python3-mpmath >= 0.19
39 BuildRequires: python3-numpy
44 BuildRequires: sphinx-pdg
45 BuildRequires: texlive-format-pdflatex
46 BuildRequires: texlive-latex
47 BuildRequires: texlive-latex-pgf
49 Requires: python-matplotlib
50 Requires: python-modules >= 1:2.7
51 Requires: python-mpmath
52 Requires: python-pyglet
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 SymPy aims to become a full-featured computer algebra system (CAS)
58 while keeping the code as simple as possible in order to be
59 comprehensible and easily extensible. SymPy is written entirely in
60 Python and does not require any external libraries.
62 %description -l pl.UTF-8
63 SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
64 (CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
65 rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
66 żadnych zewnętrznych bibliotek.
68 %package -n python3-sympy
69 Summary: Python 3 library for symbolic mathematics
70 Summary(pl.UTF-8): Biblioteka Pythona 3 do matematyki symbolicznej
71 Group: Libraries/Python
72 Requires: python3-matplotlib
73 Requires: python3-modules >= 1:3.4
74 Requires: python3-mpmath
75 Requires: python3-pyglet
77 %description -n python3-sympy
78 SymPy aims to become a full-featured computer algebra system (CAS)
79 while keeping the code as simple as possible in order to be
80 comprehensible and easily extensible. SymPy is written entirely in
81 Python and does not require any external libraries.
83 %description -n python3-sympy -l pl.UTF-8
84 SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
85 (CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
86 rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
87 żadnych zewnętrznych bibliotek.
90 Summary: Documentation for SymPy module
91 Summary(pl.UTF-8): Dokumentacja do SymPy
95 HTML documentation for SymPy.
97 %description doc -l pl.UTF-8
98 Dokumentacja do SymPy w formacie HTML.
101 %setup -q -n sympy-%{version}
106 %py_build %{?with_tests:test}
110 %py3_build %{?with_tests:test}
120 rm -rf $RPM_BUILD_ROOT
125 %{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
127 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
128 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
129 find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
130 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
138 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
139 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
140 find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
141 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
145 rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %doc AUTHORS LICENSE README.rst
151 %attr(755,root,root) %{_bindir}/isympy
152 %{py_sitescriptdir}/isympy.py[co]
153 %{py_sitescriptdir}/sympy
154 %{py_sitescriptdir}/sympy-%{version}-*.egg-info
155 %{_mandir}/man1/isympy.1*
156 %{_examplesdir}/%{name}-%{version}
160 %files -n python3-sympy
161 %defattr(644,root,root,755)
162 %doc AUTHORS LICENSE README.rst
163 %attr(755,root,root) %{_bindir}/isympy3
164 %{py3_sitescriptdir}/isympy.py
165 %{py3_sitescriptdir}/__pycache__/isympy.cpython-*.py[co]
166 %{py3_sitescriptdir}/sympy
167 %{py3_sitescriptdir}/sympy-%{version}-*.egg-info
168 %{_examplesdir}/python3-sympy-%{version}
173 %defattr(644,root,root,755)
174 %doc doc/_build/html/* doc/_build/cheatsheet/cheatsheet.pdf