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