]> git.pld-linux.org Git - packages/python-sympy.git/blob - python-sympy.spec
de6ef49bd1de4e165142f093d707a9680633a493
[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:        1.1.1
10 Release:        1
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:  c410a9c2346878716d16ec873d72e72a
15 Patch0:         docs-build.patch
16 URL:            http://sympy.org/
17 BuildRequires:  rpmbuild(macros) >= 1.710
18 BuildRequires:  gettext
19 BuildRequires:  graphviz
20 %if %{with python2}
21 BuildRequires:  python-Sphinx
22 BuildRequires:  python-devel
23 BuildRequires:  python-mpmath
24 BuildRequires:  python-numpy
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-Sphinx
28 BuildRequires:  python3-devel
29 BuildRequires:  python3-devel-tools
30 BuildRequires:  python3-mpmath
31 BuildRequires:  python3-numpy
32 %endif
33 BuildRequires:  pydoc3
34 BuildRequires:  sphinx-pdg
35 BuildRequires:  texlive-format-pdflatex
36 BuildRequires:  texlive-latex
37 BuildRequires:  texlive-latex-pgf
38 Requires:       python-matplotlib
39 Requires:       python-mpmath
40 Requires:       python-pyglet
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 SymPy aims to become a full-featured computer algebra system (CAS)
46 while keeping the code as simple as possible in order to be
47 comprehensible and easily extensible. SymPy is written entirely in
48 Python and does not require any external libraries.
49
50 %package -n python3-sympy
51 Summary:        A Python3 library for symbolic mathematics
52 Group:          Libraries/Python
53 Requires:       python3-matplotlib
54 Requires:       python3-mpmath
55 Requires:       python3-pyglet
56
57 %description -n python3-sympy
58 SymPy aims to become a full-featured computer algebra system (CAS)
59 while keeping the code as simple as possible in order to be
60 comprehensible and easily extensible. SymPy is written entirely in
61 Python and does not require any external libraries.
62
63 %package doc
64 Summary:        Documentation for sympy
65 Group:          Libraries/Python
66 Requires:       %{name} = %{version}-%{release}
67
68 %description doc
69 HTML documentation for sympy.
70
71 %prep
72 %setup -q -n sympy-%{version}
73 %patch0 -p1
74
75 %build
76 %if %{with python2}
77 %py_build %{?with_tests:test}
78 %endif
79
80 %if %{with python3}
81 %py3_build %{?with_tests:test}
82 %endif
83
84 # Build the documentation
85 cd doc
86 %{__make} html
87 %{__make} cheatsheet
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python3}
93 %py3_install
94
95 %{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
96
97 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
98 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
99 find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
100         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
101 %endif
102
103 %if %{with python2}
104 %py_install
105
106 %py_postclean
107
108 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
109 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
110 %endif
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %files
116 %defattr(644,root,root,755)
117 %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
118 %attr(755,root,root) %{_bindir}/isympy
119 %{py_sitescriptdir}/sympy
120 %{py_sitescriptdir}/sympy-%{version}-*.egg-info
121 %{_mandir}/man1/isympy.1*
122 %{_examplesdir}/%{name}-%{version}
123
124 %files -n python3-sympy
125 %defattr(644,root,root,755)
126 %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
127 %attr(755,root,root) %{_bindir}/isympy3
128 %{py3_sitescriptdir}/sympy
129 %{py3_sitescriptdir}/sympy-%{version}-*.egg-info
130 %{_examplesdir}/python3-sympy-%{version}
131
132 %files doc
133 %defattr(644,root,root,755)
134 %doc doc/_build/html/*
This page took 0.06166 seconds and 2 git commands to generate.