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