]> git.pld-linux.org Git - packages/python-sympy.git/blob - python-sympy.spec
- updated BRs
[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.0
10 Release:        2
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:  43e797de799f00f9e8fd2307dba9fab1
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:  sphinx-pdg
34 BuildRequires:  texlive-format-pdflatex
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 -p1
73
74 %build
75 %if %{with python2}
76 %py_build %{?with_tests:test}
77 %endif
78
79 %if %{with python3}
80 %py3_build %{?with_tests:test}
81 %endif
82
83 # Build the documentation
84 cd doc
85 %{__make} html
86 %{__make} cheatsheet
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python3}
92 %py3_install
93
94 %{__mv} $RPM_BUILD_ROOT%{_bindir}/isympy{,3}
95
96 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
97 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version}
98 find $RPM_BUILD_ROOT%{_examplesdir}/python3-sympy-%{version} -name '*.py' \
99         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
100 %endif
101
102 %if %{with python2}
103 %py_install
104
105 %py_postclean
106
107 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
108 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
109 %endif
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
117 %attr(755,root,root) %{_bindir}/isympy
118 %{py_sitescriptdir}/sympy
119 %{py_sitescriptdir}/sympy-%{version}-*.egg-info
120 %{_mandir}/man1/isympy.1*
121 %{_examplesdir}/%{name}-%{version}
122
123 %files -n python3-sympy
124 %defattr(644,root,root,755)
125 %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
126 %attr(755,root,root) %{_bindir}/isympy3
127 %{py3_sitescriptdir}/sympy
128 %{py3_sitescriptdir}/sympy-%{version}-*.egg-info
129 %{_examplesdir}/python3-sympy-%{version}
130
131 %files doc
132 %defattr(644,root,root,755)
133 %doc doc/_build/html/*
This page took 0.101546 seconds and 4 git commands to generate.