]> git.pld-linux.org Git - packages/python-sympy.git/blame - python-sympy.spec
- release 3 (by relup.sh)
[packages/python-sympy.git] / python-sympy.spec
CommitLineData
b336f80a
JR
1#
2# Conditional build:
cd938da9
JB
3%bcond_without doc # HTML and PDF documentation
4%bcond_without tests # unit tests
b336f80a
JR
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
cd938da9
JB
8Summary: Python 2 library for symbolic mathematics
9Summary(pl.UTF-8): Biblioteka Pythona 2 do matematyki symbolicznej
b336f80a 10Name: python-sympy
cd938da9 11Version: 1.4
e8e48178 12Release: 3
b336f80a
JR
13License: BSD
14Group: Libraries/Python
cd938da9 15#Source0Download: https://github.com/sympy/sympy/releases
b336f80a 16Source0: https://github.com/sympy/sympy/releases/download/sympy-%{version}/sympy-%{version}.tar.gz
cd938da9
JB
17# Source0-md5: 478072d75b564c9356990e3027d464e6
18Patch0: %{name}-nodisplay.patch
1457cdc5
JR
19Patch1: 0001-Exception-changed-after-numpy-1.17.patch
20Patch2: 0001-Fix-more-compatibility-issues-with-Python3.8.patch
21Patch3: 0001-Modify-literal-comparisons-as-per-python3.8-guidelines.patch
22Patch4: sympy-is.patch
cd938da9 23URL: https://www.sympy.org/
b336f80a
JR
24BuildRequires: gettext
25BuildRequires: graphviz
cd938da9
JB
26BuildRequires: rpmbuild(macros) >= 1.714
27BuildRequires: sed >= 4.0
b336f80a 28%if %{with python2}
cd938da9
JB
29BuildRequires: python-devel >= 1:2.7
30BuildRequires: python-setuptools
31%if %{with tests}
32BuildRequires: python-devel-tools
33BuildRequires: python-mpmath >= 0.19
b336f80a
JR
34BuildRequires: python-numpy
35%endif
cd938da9 36%endif
b336f80a 37%if %{with python3}
cd938da9
JB
38BuildRequires: python3-devel >= 1:3.4
39BuildRequires: python3-setuptools
40%if %{with tests}
b336f80a 41BuildRequires: python3-devel-tools
cd938da9 42BuildRequires: python3-mpmath >= 0.19
b336f80a
JR
43BuildRequires: python3-numpy
44%endif
cd938da9
JB
45%endif
46%if %{with doc}
9f977fe2 47BuildRequires: pydoc3
13fba096 48BuildRequires: python3-matplotlib
558a01dc 49BuildRequires: python3-mpmath >= 0.19
13fba096 50BuildRequires: sphinx-pdg-3
8a467d57 51BuildRequires: texlive-format-pdflatex
b336f80a 52BuildRequires: texlive-latex
225dae17 53BuildRequires: texlive-latex-ams
b336f80a 54BuildRequires: texlive-latex-pgf
cd938da9 55%endif
b336f80a 56Requires: python-matplotlib
cd938da9 57Requires: python-modules >= 1:2.7
b336f80a
JR
58Requires: python-mpmath
59Requires: python-pyglet
60BuildArch: noarch
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%description
64SymPy aims to become a full-featured computer algebra system (CAS)
65while keeping the code as simple as possible in order to be
66comprehensible and easily extensible. SymPy is written entirely in
67Python and does not require any external libraries.
68
cd938da9
JB
69%description -l pl.UTF-8
70SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
71(CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
72rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
73żadnych zewnętrznych bibliotek.
74
b336f80a 75%package -n python3-sympy
cd938da9
JB
76Summary: Python 3 library for symbolic mathematics
77Summary(pl.UTF-8): Biblioteka Pythona 3 do matematyki symbolicznej
b336f80a
JR
78Group: Libraries/Python
79Requires: python3-matplotlib
cd938da9 80Requires: python3-modules >= 1:3.4
b336f80a
JR
81Requires: python3-mpmath
82Requires: python3-pyglet
83
84%description -n python3-sympy
85SymPy aims to become a full-featured computer algebra system (CAS)
86while keeping the code as simple as possible in order to be
87comprehensible and easily extensible. SymPy is written entirely in
88Python and does not require any external libraries.
89
cd938da9
JB
90%description -n python3-sympy -l pl.UTF-8
91SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
92(CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
93rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
94żadnych zewnętrznych bibliotek.
95
b336f80a 96%package doc
cd938da9
JB
97Summary: Documentation for SymPy module
98Summary(pl.UTF-8): Dokumentacja do SymPy
99Group: Documentation
b336f80a
JR
100
101%description doc
cd938da9
JB
102HTML documentation for SymPy.
103
104%description doc -l pl.UTF-8
105Dokumentacja do SymPy w formacie HTML.
b336f80a
JR
106
107%prep
108%setup -q -n sympy-%{version}
e7d4bee6 109%patch0 -p1
1457cdc5
JR
110%patch1 -p1
111%patch2 -p1
112%patch3 -p1
113%patch4 -p1
b336f80a
JR
114
115%build
116%if %{with python2}
2ac80b5d 117%py_build %{?with_tests:test}
b336f80a
JR
118%endif
119
120%if %{with python3}
2ac80b5d 121%py3_build %{?with_tests:test}
b336f80a
JR
122%endif
123
cd938da9 124%if %{with doc}
558a01dc 125pydir=$(pwd)/build-3/lib
b336f80a 126cd doc
558a01dc 127PYTHONPATH=$pydir \
13fba096
JB
128%{__make} html \
129 SPHINXBUILD=sphinx-build-3
b336f80a 130%{__make} cheatsheet
cd938da9 131%endif
b336f80a
JR
132
133%install
134rm -rf $RPM_BUILD_ROOT
135
136%if %{with python3}
2ac80b5d 137%py3_install
b336f80a
JR
138
139%{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
140
141install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
142cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
143find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
144 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
145%endif
146
147%if %{with python2}
2ac80b5d 148%py_install
b336f80a
JR
149
150%py_postclean
151
152install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
153cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cd938da9
JB
154find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
155 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
b336f80a
JR
156%endif
157
158%clean
159rm -rf $RPM_BUILD_ROOT
160
cd938da9 161%if %{with python2}
b336f80a
JR
162%files
163%defattr(644,root,root,755)
cd938da9 164%doc AUTHORS LICENSE README.rst
b336f80a 165%attr(755,root,root) %{_bindir}/isympy
cd938da9 166%{py_sitescriptdir}/isympy.py[co]
b336f80a
JR
167%{py_sitescriptdir}/sympy
168%{py_sitescriptdir}/sympy-%{version}-*.egg-info
169%{_mandir}/man1/isympy.1*
170%{_examplesdir}/%{name}-%{version}
cd938da9 171%endif
b336f80a 172
cd938da9 173%if %{with python3}
b336f80a
JR
174%files -n python3-sympy
175%defattr(644,root,root,755)
cd938da9 176%doc AUTHORS LICENSE README.rst
b336f80a 177%attr(755,root,root) %{_bindir}/isympy3
cd938da9
JB
178%{py3_sitescriptdir}/isympy.py
179%{py3_sitescriptdir}/__pycache__/isympy.cpython-*.py[co]
b336f80a
JR
180%{py3_sitescriptdir}/sympy
181%{py3_sitescriptdir}/sympy-%{version}-*.egg-info
182%{_examplesdir}/python3-sympy-%{version}
cd938da9 183%endif
b336f80a 184
cd938da9 185%if %{with doc}
b336f80a
JR
186%files doc
187%defattr(644,root,root,755)
cd938da9
JB
188%doc doc/_build/html/* doc/_build/cheatsheet/cheatsheet.pdf
189%endif
This page took 0.132283 seconds and 4 git commands to generate.