1 |
%define module sympy |
2 |
|
3 |
Summary: Python library for symbolic mathematics |
4 |
Name: python-%{module} |
5 |
Version: 0.7.3 |
6 |
Release: %mkrel 3 |
7 |
Source0: https://github.com/%{module}/%{module}/releases/download/%{module}-%{version}/%{module}-%{version}.tar.gz |
8 |
Source1: https://github.com/%{module}/%{module}/releases/download/%{module}-%{version}/%{module}-%{version}-py3.3.tar.gz |
9 |
Patch0: sympy-0.7.3-strip-internal-mpmath.patch |
10 |
License: BSD |
11 |
Group: Development/Python |
12 |
Url: http://sympy.googlecode.com/ |
13 |
Requires: python-numpy |
14 |
Suggests: python-gmpy >= 1.03, python-pyglet |
15 |
BuildRequires: python-devel |
16 |
BuildRequires: python-sphinx |
17 |
BuildRequires: python-mpmath |
18 |
BuildArch: noarch |
19 |
|
20 |
%description |
21 |
SymPy is a Python library for symbolic mathematics. It aims to become |
22 |
a full-featured computer algebra system (CAS) while keeping the code |
23 |
as simple as possible in order to be comprehensible and easily |
24 |
extensible. SymPy is written entirely in Python and does not require |
25 |
any external libraries, except optionally for plotting support. |
26 |
|
27 |
%package texmacs |
28 |
Summary: TeXmacs integration for sympy |
29 |
Group: Development/Python |
30 |
Requires: %{name} = %{version}-%{release}, TeXmacs |
31 |
|
32 |
%description texmacs |
33 |
This package contains a TeXmacs plugin for sympy. |
34 |
|
35 |
%package examples |
36 |
Summary: Sympy examples |
37 |
Group: Development/Python |
38 |
Requires: %{name} = %{version}-%{release} |
39 |
|
40 |
%description examples |
41 |
This package contains example input for sympy. |
42 |
|
43 |
%package doc |
44 |
Summary: Documentation for sympy |
45 |
Group: Development/Python |
46 |
|
47 |
%description doc |
48 |
man and HTML documentation for sympy. |
49 |
|
50 |
%package -n python3-%{module} |
51 |
Summary: Python 3 library for symbolic mathematics |
52 |
Group: Development/Python |
53 |
BuildRequires: python3-devel |
54 |
BuildRequires: python3-mpmath |
55 |
|
56 |
%description -n python3-%{module} |
57 |
SymPy is a Python 3 library for symbolic mathematics. It aims to become |
58 |
a full-featured computer algebra system (CAS) while keeping the code |
59 |
as simple as possible in order to be comprehensible and easily |
60 |
extensible. SymPy is written entirely in Python 3 and does not require |
61 |
any external libraries, except optionally for plotting support. |
62 |
|
63 |
%prep |
64 |
%setup -q -n %{module}-%{version} |
65 |
%patch0 -b .mpmath |
66 |
rm -rf sympy/mpmath doc/src/modules/mpmath |
67 |
mkdir %{py3dir} |
68 |
pushd %{py3dir} |
69 |
gzip -dc %{SOURCE1} | tar -xvvf - |
70 |
popd |
71 |
|
72 |
%build |
73 |
%{__python} setup.py build |
74 |
|
75 |
pushd doc |
76 |
make html |
77 |
popd |
78 |
|
79 |
pushd %{py3dir}/%{module}-%{version} |
80 |
rm sympy/mpmath/libmp/exec_py2.py |
81 |
%{__python3} setup.py build |
82 |
popd |
83 |
|
84 |
%install |
85 |
pushd %{py3dir}/%{module}-%{version} |
86 |
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} |
87 |
mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy |
88 |
popd |
89 |
|
90 |
%{__python} setup.py install -O1 --skip-build --root %{buildroot} |
91 |
# Remove extra files |
92 |
rm -f %{buildroot}%{_bindir}/{,doc}test |
93 |
|
94 |
# Install the TeXmacs integration |
95 |
cp -p data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir} |
96 |
mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy |
97 |
cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy |
98 |
|
99 |
# Don't let an executable script go into the documentation |
100 |
chmod a-x examples/all.py |
101 |
|
102 |
# Install the HTML documentation |
103 |
mkdir -p %{buildroot}%{_docdir}/%{name}-doc |
104 |
cp -a doc/_build/html %{buildroot}%{_docdir}/%{name}-doc |
105 |
rm -f %{buildroot}%{_docdir}/%{name}-doc/html/.buildinfo |
106 |
rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n |
107 |
|
108 |
%files |
109 |
%doc AUTHORS LICENSE PKG-INFO |
110 |
%{python_sitelib}/sympy/ |
111 |
%{python_sitelib}/sympy-%{version}-*.egg-info |
112 |
%{_bindir}/isympy |
113 |
|
114 |
%files texmacs |
115 |
%doc data/TeXmacs/LICENSE |
116 |
%{_bindir}/tm_sympy |
117 |
%{_datadir}/TeXmacs/plugins/sympy/ |
118 |
|
119 |
%files examples |
120 |
%doc examples |
121 |
|
122 |
%files doc |
123 |
%docdir %{_docdir}/%{name}-doc/html |
124 |
%{_docdir}/%{name}-doc/html |
125 |
%{_mandir}/man1/isympy.1* |
126 |
|
127 |
%files -n python3-%{module} |
128 |
%doc AUTHORS LICENSE PKG-INFO |
129 |
%{python3_sitelib}/sympy/ |
130 |
%{python3_sitelib}/sympy-%{version}-*.egg-info |
131 |
%{_bindir}/python3-isympy |
132 |
|