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