]>
Commit | Line | Data |
---|---|---|
27a21b56 | 1 | # NOTE: for versions >= 1.0 see python3-numpydoc.spec |
c2447f6d JB |
2 | # |
3 | # Conditional build: | |
4 | %bcond_without tests # unit tests | |
5 | %bcond_without python2 # CPython 2.x module | |
27a21b56 | 6 | %bcond_with python3 # CPython 3.x module (built from python3-numpydoc.spec) |
c2447f6d JB |
7 | |
8 | Summary: Sphinx extension to support docstrings in Numpy format | |
9 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsług docstringów w formacie Numpy | |
10 | Name: python-numpydoc | |
27a21b56 | 11 | # NOTE: keep 0.x here for python2 support |
c2447f6d | 12 | Version: 0.9.2 |
5e08cd6a | 13 | Release: 3 |
c2447f6d JB |
14 | License: BSD |
15 | Group: Libraries/Python | |
16 | #Source0Download: https://pypi.org/simple/numpydoc/ | |
17 | Source0: https://files.pythonhosted.org/packages/source/n/numpydoc/numpydoc-%{version}.tar.gz | |
18 | # Source0-md5: d3320d808b8776727bac05b32fb24c82 | |
19 | URL: https://pypi.org/project/numpydoc/ | |
20 | %if %{with python2} | |
21 | BuildRequires: python-modules >= 1:2.7 | |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-Sphinx >= 1.6.5 | |
25 | BuildRequires: python-jinja2 >= 2.3 | |
26 | BuildRequires: python-pytest | |
27 | %endif | |
28 | %endif | |
29 | %if %{with python3} | |
30 | BuildRequires: python3-modules >= 1:3.4 | |
31 | BuildRequires: python3-setuptools | |
32 | %if %{with tests} | |
33 | BuildRequires: python3-Sphinx >= 1.6.5 | |
34 | BuildRequires: python3-jinja2 >= 2.3 | |
35 | BuildRequires: python3-pytest | |
36 | %endif | |
37 | %endif | |
38 | BuildRequires: rpm-pythonprov | |
39 | BuildRequires: rpmbuild(macros) >= 1.714 | |
40 | Requires: python-modules >= 1:2.7 | |
41 | BuildArch: noarch | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %description | |
45 | This package provides the numpydoc Sphinx extension for handling | |
46 | docstrings formatted according to the NumPy documentation format. The | |
47 | extension also adds the code description directives "np:function", | |
48 | "np-c:function", etc. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Ten pakiet zawiera rozszerzenie Sphinksa do obsługi docstringów | |
52 | sformatowanych zgodnie z formatem dokumentacji NumPy. Rozszerzenie | |
53 | dodaje także dyrektywy opisu kodu "np:function", "np-c:function" itp. | |
54 | ||
55 | %package -n python3-numpydoc | |
56 | Summary: Sphinx extension to support docstrings in Numpy format | |
57 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsług docstringów w formacie Numpy | |
58 | Group: Libraries/Python | |
59 | Requires: python3-modules >= 1:3.4 | |
60 | ||
61 | %description -n python3-numpydoc | |
62 | This package provides the numpydoc Sphinx extension for handling | |
63 | docstrings formatted according to the NumPy documentation format. The | |
64 | extension also adds the code description directives "np:function", | |
65 | "np-c:function", etc. | |
66 | ||
67 | %description -n python3-numpydoc -l pl.UTF-8 | |
68 | Ten pakiet zawiera rozszerzenie Sphinksa do obsługi docstringów | |
69 | sformatowanych zgodnie z formatem dokumentacji NumPy. Rozszerzenie | |
70 | dodaje także dyrektywy opisu kodu "np:function", "np-c:function" itp. | |
71 | ||
72 | %prep | |
73 | %setup -q -n numpydoc-%{version} | |
74 | ||
75 | %build | |
76 | %if %{with python2} | |
77 | %py_build | |
78 | ||
79 | %if %{with tests} | |
80 | %{__python} -m pytest numpydoc/tests | |
81 | %endif | |
82 | %endif | |
83 | ||
84 | %if %{with python3} | |
85 | %py3_build | |
86 | ||
87 | %if %{with tests} | |
88 | %{__python3} -m pytest numpydoc/tests | |
89 | %endif | |
90 | %endif | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %if %{with python2} | |
96 | %py_install | |
97 | ||
bc69b252 | 98 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/numpydoc/tests |
c2447f6d JB |
99 | %py_postclean |
100 | %endif | |
101 | ||
102 | %if %{with python3} | |
103 | %py3_install | |
bc69b252 JB |
104 | |
105 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/numpydoc/tests | |
c2447f6d JB |
106 | %endif |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %if %{with python2} | |
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc LICENSE.txt README.rst | |
115 | %{py_sitescriptdir}/numpydoc | |
116 | %{py_sitescriptdir}/numpydoc-%{version}-py*.egg-info | |
117 | %endif | |
118 | ||
119 | %if %{with python3} | |
120 | %files -n python3-numpydoc | |
121 | %defattr(644,root,root,755) | |
122 | %doc LICENSE.txt README.rst | |
123 | %{py3_sitescriptdir}/numpydoc | |
124 | %{py3_sitescriptdir}/numpydoc-%{version}-py*.egg-info | |
125 | %endif |