]> git.pld-linux.org Git - packages/python-sympy.git/blob - python-sympy.spec
- release 7 (by relup.sh)
[packages/python-sympy.git] / python-sympy.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        A Python library for symbolic mathematics
8 Name:           python-sympy
9 Version:        0.7.4
10 Release:        7
11 License:        BSD
12 Group:          Libraries/Python
13 Source0:        https://github.com/sympy/sympy/releases/download/sympy-%{version}/sympy-%{version}.tar.gz
14 # Source0-md5:  12432b35af31b31864a10993710f61a6
15 # Upstream tried to graft in another project as a private copy; we rip
16 # it out (rhbz# 551576):
17 Patch0:         strip-internal-mpmath.patch
18 Patch1:         sympy-doc.patch
19 URL:            http://sympy.org/
20 BuildRequires:  gettext
21 BuildRequires:  graphviz
22 %if %{with python2}
23 BuildRequires:  python-Sphinx
24 BuildRequires:  python-devel
25 BuildRequires:  python-mpmath
26 BuildRequires:  python-numpy
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-Sphinx
30 BuildRequires:  python3-devel
31 BuildRequires:  python3-devel-tools
32 BuildRequires:  python3-mpmath
33 BuildRequires:  python3-numpy
34 %endif
35 BuildRequires:  texlive-latex
36 BuildRequires:  texlive-latex-pgf
37 Requires:       python-matplotlib
38 Requires:       python-mpmath
39 Requires:       python-pyglet
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 SymPy aims to become a full-featured computer algebra system (CAS)
45 while keeping the code as simple as possible in order to be
46 comprehensible and easily extensible. SymPy is written entirely in
47 Python and does not require any external libraries.
48
49 %package -n python3-sympy
50 Summary:        A Python3 library for symbolic mathematics
51 Group:          Libraries/Python
52 Requires:       python3-matplotlib
53 Requires:       python3-mpmath
54 Requires:       python3-pyglet
55
56 %description -n python3-sympy
57 SymPy aims to become a full-featured computer algebra system (CAS)
58 while keeping the code as simple as possible in order to be
59 comprehensible and easily extensible. SymPy is written entirely in
60 Python and does not require any external libraries.
61
62 %package doc
63 Summary:        Documentation for sympy
64 Group:          Libraries/Python
65 Requires:       %{name} = %{version}-%{release}
66
67 %description doc
68 HTML documentation for sympy.
69
70 %prep
71 %setup -q -n sympy-%{version}
72 %patch0
73 %patch1 -p1
74 %{__rm} -rf sympy/mpmath doc/src/modules/mpmath
75
76 %build
77 %if %{with python2}
78 %py_build %{?with_tests:test}
79 %endif
80
81 %if %{with python3}
82 %py3_build %{?with_tests:test}
83 %endif
84
85 # Build the documentation
86 cd doc
87 %{__make} html
88 %{__make} cheatsheet
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python3}
94 %py3_install
95
96 %{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
97
98 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
99 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
100 find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
101         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
102 %endif
103
104 %if %{with python2}
105 %py_install
106
107 %py_postclean
108
109 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
110 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
111 %endif
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %files
117 %defattr(644,root,root,755)
118 %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
119 %attr(755,root,root) %{_bindir}/isympy
120 %{py_sitescriptdir}/sympy
121 %{py_sitescriptdir}/sympy-%{version}-*.egg-info
122 %{_mandir}/man1/isympy.1*
123 %{_examplesdir}/%{name}-%{version}
124
125 %files -n python3-sympy
126 %defattr(644,root,root,755)
127 %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
128 %attr(755,root,root) %{_bindir}/isympy3
129 %{py3_sitescriptdir}/sympy
130 %{py3_sitescriptdir}/sympy-%{version}-*.egg-info
131 %{_examplesdir}/python3-sympy-%{version}
132
133 %files doc
134 %defattr(644,root,root,755)
135 %doc doc/_build/html/*
This page took 0.042227 seconds and 4 git commands to generate.