]> git.pld-linux.org Git - packages/python-sympy.git/blame - python-sympy.spec
- updated to 1.4
[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
afb29cf8 12Release: 1
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
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}
cd938da9
JB
34BuildRequires: python3-devel >= 1:3.4
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
8a467d57
JR
44BuildRequires: sphinx-pdg
45BuildRequires: texlive-format-pdflatex
b336f80a
JR
46BuildRequires: texlive-latex
47BuildRequires: texlive-latex-pgf
cd938da9 48%endif
b336f80a 49Requires: python-matplotlib
cd938da9 50Requires: python-modules >= 1:2.7
b336f80a
JR
51Requires: python-mpmath
52Requires: python-pyglet
53BuildArch: noarch
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56%description
57SymPy aims to become a full-featured computer algebra system (CAS)
58while keeping the code as simple as possible in order to be
59comprehensible and easily extensible. SymPy is written entirely in
60Python and does not require any external libraries.
61
cd938da9
JB
62%description -l pl.UTF-8
63SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
64(CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
65rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
66żadnych zewnętrznych bibliotek.
67
b336f80a 68%package -n python3-sympy
cd938da9
JB
69Summary: Python 3 library for symbolic mathematics
70Summary(pl.UTF-8): Biblioteka Pythona 3 do matematyki symbolicznej
b336f80a
JR
71Group: Libraries/Python
72Requires: python3-matplotlib
cd938da9 73Requires: python3-modules >= 1:3.4
b336f80a
JR
74Requires: python3-mpmath
75Requires: python3-pyglet
76
77%description -n python3-sympy
78SymPy aims to become a full-featured computer algebra system (CAS)
79while keeping the code as simple as possible in order to be
80comprehensible and easily extensible. SymPy is written entirely in
81Python and does not require any external libraries.
82
cd938da9
JB
83%description -n python3-sympy -l pl.UTF-8
84SymPy ma być w pełni funkcjonalnym systemem algebry komputerowej
85(CAS), a jednocześnie mieć jak najprostszy, czytelny i łatwo
86rozszerzalny kod. Jest pisany całkowicie w Pythonie i nie wymaga
87żadnych zewnętrznych bibliotek.
88
b336f80a 89%package doc
cd938da9
JB
90Summary: Documentation for SymPy module
91Summary(pl.UTF-8): Dokumentacja do SymPy
92Group: Documentation
b336f80a
JR
93
94%description doc
cd938da9
JB
95HTML documentation for SymPy.
96
97%description doc -l pl.UTF-8
98Dokumentacja do SymPy w formacie HTML.
b336f80a
JR
99
100%prep
101%setup -q -n sympy-%{version}
e7d4bee6 102%patch0 -p1
b336f80a
JR
103
104%build
105%if %{with python2}
2ac80b5d 106%py_build %{?with_tests:test}
b336f80a
JR
107%endif
108
109%if %{with python3}
2ac80b5d 110%py3_build %{?with_tests:test}
b336f80a
JR
111%endif
112
cd938da9 113%if %{with doc}
b336f80a
JR
114cd doc
115%{__make} html
116%{__make} cheatsheet
cd938da9 117%endif
b336f80a
JR
118
119%install
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python3}
2ac80b5d 123%py3_install
b336f80a
JR
124
125%{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
126
127install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
128cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
129find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
130 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
131%endif
132
133%if %{with python2}
2ac80b5d 134%py_install
b336f80a
JR
135
136%py_postclean
137
138install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
139cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cd938da9
JB
140find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
141 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
b336f80a
JR
142%endif
143
144%clean
145rm -rf $RPM_BUILD_ROOT
146
cd938da9 147%if %{with python2}
b336f80a
JR
148%files
149%defattr(644,root,root,755)
cd938da9 150%doc AUTHORS LICENSE README.rst
b336f80a 151%attr(755,root,root) %{_bindir}/isympy
cd938da9 152%{py_sitescriptdir}/isympy.py[co]
b336f80a
JR
153%{py_sitescriptdir}/sympy
154%{py_sitescriptdir}/sympy-%{version}-*.egg-info
155%{_mandir}/man1/isympy.1*
156%{_examplesdir}/%{name}-%{version}
cd938da9 157%endif
b336f80a 158
cd938da9 159%if %{with python3}
b336f80a
JR
160%files -n python3-sympy
161%defattr(644,root,root,755)
cd938da9 162%doc AUTHORS LICENSE README.rst
b336f80a 163%attr(755,root,root) %{_bindir}/isympy3
cd938da9
JB
164%{py3_sitescriptdir}/isympy.py
165%{py3_sitescriptdir}/__pycache__/isympy.cpython-*.py[co]
b336f80a
JR
166%{py3_sitescriptdir}/sympy
167%{py3_sitescriptdir}/sympy-%{version}-*.egg-info
168%{_examplesdir}/python3-sympy-%{version}
cd938da9 169%endif
b336f80a 170
cd938da9 171%if %{with doc}
b336f80a
JR
172%files doc
173%defattr(644,root,root,755)
cd938da9
JB
174%doc doc/_build/html/* doc/_build/cheatsheet/cheatsheet.pdf
175%endif
This page took 0.119554 seconds and 4 git commands to generate.