]> git.pld-linux.org Git - SPECS.git/blob - python-sphinxcontrib-napoleon.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / python-sphinxcontrib-napoleon.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # Sphinx documentation (not included in sdist)
4 %bcond_with     tests   # unit tests (not included in sdist)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Sphinx "napoleon" extension
9 Summary(pl.UTF-8):      Rozszerzenie "napoleon" dla Sphinksa
10 Name:           python-sphinxcontrib-napoleon
11 Version:        0.7
12 Release:        1
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/sphinxcontrib-napoleon/
16 Source0:        https://files.pythonhosted.org/packages/source/s/sphinxcontrib-napoleon/sphinxcontrib-napoleon-%{version}.tar.gz
17 # Source0-md5:  080555f8bcdf5de9819798c24bdd02f8
18 URL:            https://pypi.org/project/sphinxcontrib-napoleon/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.5
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-Sphinx >= 1.2
24 BuildRequires:  python-docutils >= 0.10
25 BuildRequires:  python-mock >= 1.0.1
26 BuildRequires:  python-nose >= 1.3.0
27 BuildRequires:  python-pockets >= 0.3
28 BuildRequires:  python-six >= 1.5.2
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.2
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-Sphinx >= 1.2
36 BuildRequires:  python3-docutils >= 0.10
37 BuildRequires:  python3-nose >= 1.3.0
38 BuildRequires:  python3-pockets >= 0.3
39 BuildRequires:  python3-six >= 1.5.2
40 %endif
41 %endif
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 %if %{with doc}
45 BuildRequires:  python-pockets >= 0.3
46 BuildRequires:  python-six >= 1.5.2
47 BuildRequires:  sphinx-pdg-2 >= 1.3.1
48 %endif
49 Requires:       python-modules >= 1:2.5
50 BuildArch:      noarch
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 Napoleon - marching toward legible docstrings.
55
56 %description -l pl.UTF-8
57 Napoleon - wyjście naprzeciw czytelnym docstringom.
58
59 %package -n python3-sphinxcontrib-napoleon
60 Summary:        Sphinx "napoleon" extension
61 Summary(pl.UTF-8):      Rozszerzenie "napoleon" dla Sphinksa
62 Group:          Libraries/Python
63 Requires:       python3-modules >= 1:3.2
64
65 %description -n python3-sphinxcontrib-napoleon
66 Napoleon - marching toward legible docstrings.
67
68 %description -n python3-sphinxcontrib-napoleon -l pl.UTF-8
69 Napoleon - wyjście naprzeciw czytelnym docstringom.
70
71 %package apidocs
72 Summary:        API documentation for Python sphinxcontrib-napoleon module
73 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona sphinxcontrib-napoleon
74 Group:          Documentation
75
76 %description apidocs
77 API documentation for Python sphinxcontrib-napoleon module.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona sphinxcontrib-napoleon.
81
82 %prep
83 %setup -q -n sphinxcontrib-napoleon-%{version}
84
85 %build
86 %if %{with python2}
87 %py_build
88
89 %if %{with tests}
90 nosetests-%{py_ver} tests
91 %endif
92 %endif
93
94 %if %{with python3}
95 %py3_build
96
97 %if %{with tests}
98 nosetests-%{py3_ver} tests
99 %endif
100 %endif
101
102 %if %{with doc}
103 %{__make} -C docs html \
104         SPHINXBUILD=sphinx-build-2
105 %endif
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %py_install
112
113 %py_postclean
114 %endif
115
116 %if %{with python3}
117 %py3_install
118 %endif
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %if %{with python2}
124 %files
125 %defattr(644,root,root,755)
126 %doc CHANGES LICENSE README.rst
127 %{py_sitescriptdir}/sphinxcontrib/napoleon
128 %{py_sitescriptdir}/sphinxcontrib_napoleon-%{version}-py*.egg-info
129 %{py_sitescriptdir}/sphinxcontrib_napoleon-%{version}-py*-nspkg.pth
130 %endif
131
132 %if %{with python3}
133 %files -n python3-sphinxcontrib-napoleon
134 %defattr(644,root,root,755)
135 %doc CHANGES LICENSE README.rst
136 %{py3_sitescriptdir}/sphinxcontrib/napoleon
137 %{py3_sitescriptdir}/sphinxcontrib_napoleon-%{version}-py*.egg-info
138 %{py3_sitescriptdir}/sphinxcontrib_napoleon-%{version}-py*-nspkg.pth
139 %endif
140
141 %if %{with doc}
142 %files apidocs
143 %defattr(644,root,root,755)
144 %doc docs/_build/html/*
145 %endif
This page took 0.16326 seconds and 3 git commands to generate.