]>
Commit | Line | Data |
---|---|---|
992edea4 | 1 | # there are sphinx.spec, sphinx2.spec... Sphinx.spec is too confusing |
2 | # therefore the name for this package is sphinx-pdg (pdg - python | |
3 | # documentation generator) | |
b9b9d288 JK |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without python3_default # Use Python 3.x for easy_install executable | |
7 | ||
79af714d JB |
8 | Summary: Sphinx - Python documentation generator |
9 | Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona | |
4acf166f | 10 | Name: sphinx-pdg |
a84e9210 JB |
11 | Version: 1.3.2 |
12 | Release: 1 | |
4acf166f | 13 | License: BSD |
14 | Group: Development/Languages/Python | |
a84e9210 | 15 | #Source0Download: https://pypi.python.org/pypi/Sphinx |
4ecfdc9d | 16 | Source0: https://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz |
a84e9210 | 17 | # Source0-md5: 740b8171b760fb1fa801bf2d1f2d3133 |
b844f666 | 18 | URL: http://sphinx.pocoo.org/ |
5c7437a8 | 19 | BuildRequires: python-devel >= 1:2.5 |
5c7437a8 | 20 | BuildRequires: python-modules >= 1:2.5 |
15943969 | 21 | BuildRequires: python-setuptools >= 7.0 |
7f1d6506 AF |
22 | BuildRequires: python3-2to3 |
23 | BuildRequires: python3-devel | |
f82fee34 | 24 | BuildRequires: python3-modules |
15943969 | 25 | BuildRequires: python3-setuptools >= 7.0 |
d6f62011 | 26 | BuildRequires: rpm-pythonprov |
15943969 | 27 | BuildRequires: rpmbuild(macros) >= 1.710 |
b9b9d288 JK |
28 | %if %{with python3_default} |
29 | Requires: python3-Sphinx = %{version}-%{release} | |
30 | Requires: python3-devel-tools | |
31 | Provides: %{name}-3 = %{version}-%{release} | |
15943969 | 32 | Obsoletes: sphinx-pdg-3 |
b9b9d288 | 33 | %else |
8dffcc23 | 34 | Requires: python-Sphinx = %{version}-%{release} |
b18e6f45 | 35 | Requires: python-devel-tools |
b9b9d288 | 36 | Provides: %{name}-2 = %{version}-%{release} |
15943969 | 37 | Obsoletes: sphinx-pdg-2 |
b9b9d288 | 38 | %endif |
4acf166f | 39 | BuildArch: noarch |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
d6f62011 | 43 | Sphinx is a tool that makes it easy to create intelligent and |
44 | beautiful documentation for Python projects (or other documents | |
45 | consisting of multiple reStructuredText sources), written by Georg | |
46 | Brandl. It was originally created to translate the new Python | |
47 | documentation, but has now been cleaned up in the hope that it will be | |
48 | useful to many other projects. | |
4acf166f | 49 | |
79af714d JB |
50 | %description -l pl.UTF-8 |
51 | Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej | |
52 | dokumentacji dla projektów w Pythonie (lub innych dokumentów | |
53 | składających się z wielu źródeł w formacie reStructuredText), napisane | |
54 | przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej | |
55 | dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że | |
56 | będzie przydatne dla wielu innych projektów. | |
57 | ||
a84e9210 JB |
58 | %package 2 |
59 | Summary: Sphinx Python documentation generator (Python 2 version) | |
60 | Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 2) | |
e7b5373a | 61 | Group: Development/Languages/Python |
a84e9210 | 62 | Requires: python-Sphinx = %{version}-%{release} |
e7b5373a | 63 | |
a84e9210 | 64 | %description 2 |
e7b5373a | 65 | Sphinx is a tool that makes it easy to create intelligent and |
66 | beautiful documentation for Python projects (or other documents | |
67 | consisting of multiple reStructuredText sources), written by Georg | |
68 | Brandl. It was originally created to translate the new Python | |
69 | documentation, but has now been cleaned up in the hope that it will be | |
70 | useful to many other projects. | |
71 | ||
a84e9210 | 72 | %description 2 -l pl.UTF-8 |
79af714d JB |
73 | Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej |
74 | dokumentacji dla projektów w Pythonie (lub innych dokumentów | |
75 | składających się z wielu źródeł w formacie reStructuredText), napisane | |
76 | przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej | |
77 | dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że | |
78 | będzie przydatne dla wielu innych projektów. | |
79 | ||
a84e9210 JB |
80 | %package 3 |
81 | Summary: Sphinx Python documentation generator (Python 3 version) | |
82 | Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 3) | |
b9b9d288 | 83 | Group: Development/Languages/Python |
a84e9210 | 84 | Requires: python3-Sphinx = %{version}-%{release} |
b9b9d288 | 85 | |
a84e9210 | 86 | %description 3 |
b9b9d288 JK |
87 | Sphinx is a tool that makes it easy to create intelligent and |
88 | beautiful documentation for Python projects (or other documents | |
89 | consisting of multiple reStructuredText sources), written by Georg | |
90 | Brandl. It was originally created to translate the new Python | |
91 | documentation, but has now been cleaned up in the hope that it will be | |
92 | useful to many other projects. | |
93 | ||
a84e9210 | 94 | %description 3 -l pl.UTF-8 |
b9b9d288 JK |
95 | Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej |
96 | dokumentacji dla projektów w Pythonie (lub innych dokumentów | |
97 | składających się z wielu źródeł w formacie reStructuredText), napisane | |
98 | przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej | |
99 | dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że | |
100 | będzie przydatne dla wielu innych projektów. | |
101 | ||
8dffcc23 JB |
102 | %package -n python-Sphinx |
103 | Summary: Sphinx Python documentation generator (Python 2.x modules) | |
104 | Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 2.x) | |
105 | Group: Development/Languages/Python | |
ac0b54ce JB |
106 | Requires: python-docutils >= 0.7 |
107 | Requires: python-jinja2 >= 2.3 | |
b18e6f45 | 108 | Requires: python-modules |
ac0b54ce | 109 | Requires: python-pygments >= 1.2 |
15943969 | 110 | Requires: python-setuptools > 7.0 |
8dffcc23 JB |
111 | Conflicts: sphinx-pdg < 1.0.7-2 |
112 | ||
113 | %description -n python-Sphinx | |
114 | Sphinx Python documentation generator (Python 2.x modules). | |
115 | ||
116 | For command-line utilities, see sphinx-pdg package. | |
117 | ||
118 | %description -n python-Sphinx -l pl.UTF-8 | |
119 | Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły | |
120 | Pythona 2.x). | |
121 | ||
122 | Narzędzia działające z linii poleceń znajdują się w pakiecie | |
123 | sphinx-pdg. | |
124 | ||
125 | %package -n python3-Sphinx | |
126 | Summary: Sphinx Python documentation generator (Python 3.x modules) | |
127 | Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 3.x) | |
128 | Group: Development/Languages/Python | |
8dffcc23 | 129 | Requires: python3-docutils >= 0.8 |
ac0b54ce JB |
130 | Requires: python3-jinja2 >= 2.3 |
131 | Requires: python3-pygments >= 1.2 | |
15943969 | 132 | Requires: python3-setuptools > 7.0 |
8dffcc23 JB |
133 | Conflicts: sphinx-pdg-3 < 1.0.7-2 |
134 | ||
135 | %description -n python3-Sphinx | |
136 | Sphinx Python documentation generator (Python 3.x modules). | |
137 | ||
138 | For command-line utilities, see sphinx-pdg-3 package. | |
139 | ||
140 | %description -n python3-Sphinx -l pl.UTF-8 | |
141 | Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły | |
142 | Pythona 3.x). | |
143 | ||
144 | Narzędzia działające z linii poleceń znajdują się w pakiecie | |
145 | sphinx-pdg-3. | |
146 | ||
4acf166f | 147 | %prep |
148 | %setup -q -n Sphinx-%{version} | |
149 | ||
150 | %build | |
b9b9d288 | 151 | %py_build |
3d438c82 | 152 | %{__rm} sphinx/__init__.pyc |
b9b9d288 | 153 | %py3_build |
3d438c82 | 154 | %{__rm} -r sphinx/__pycache__ |
4acf166f | 155 | |
156 | %install | |
157 | rm -rf $RPM_BUILD_ROOT | |
4acf166f | 158 | |
b9b9d288 JK |
159 | %py_install |
160 | %{__rm} sphinx/__init__.pyc | |
161 | %py_postclean | |
162 | ||
163 | for f in $RPM_BUILD_ROOT%{_bindir}/*; do | |
164 | mv "${f}" "${f}-2" | |
165 | done | |
166 | ||
167 | %py3_install | |
3d438c82 | 168 | %{__rm} -r sphinx/__pycache__ |
e7b5373a | 169 | |
170 | for f in $RPM_BUILD_ROOT%{_bindir}/*; do | |
b9b9d288 | 171 | [ "${f%%-2}" == "$f" ] || continue |
e7b5373a | 172 | mv "${f}" "${f}-3" |
173 | done | |
174 | ||
b9b9d288 JK |
175 | %if %{with python3_default} |
176 | for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do | |
177 | ln "${f}" "${f%%-3}" | |
178 | done | |
179 | %else | |
180 | for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do | |
181 | ln "${f}" "${f%%-2}" | |
182 | done | |
183 | %endif | |
4acf166f | 184 | |
185 | %clean | |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
188 | %files | |
189 | %defattr(644,root,root,755) | |
1c0e06e7 | 190 | %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst |
79af714d | 191 | %attr(755,root,root) %{_bindir}/sphinx-autogen |
1f35fc81 | 192 | %attr(755,root,root) %{_bindir}/sphinx-apidoc |
79af714d JB |
193 | %attr(755,root,root) %{_bindir}/sphinx-build |
194 | %attr(755,root,root) %{_bindir}/sphinx-quickstart | |
b9b9d288 JK |
195 | %if %{with python3_default} |
196 | %attr(755,root,root) %{_bindir}/sphinx-autogen-3 | |
197 | %attr(755,root,root) %{_bindir}/sphinx-apidoc-3 | |
198 | %attr(755,root,root) %{_bindir}/sphinx-build-3 | |
199 | %attr(755,root,root) %{_bindir}/sphinx-quickstart-3 | |
200 | ||
201 | %files 2 | |
202 | %defattr(644,root,root,755) | |
203 | %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst | |
204 | %attr(755,root,root) %{_bindir}/sphinx-autogen-2 | |
205 | %attr(755,root,root) %{_bindir}/sphinx-apidoc-2 | |
206 | %attr(755,root,root) %{_bindir}/sphinx-build-2 | |
207 | %attr(755,root,root) %{_bindir}/sphinx-quickstart-2 | |
208 | ||
209 | %else | |
210 | %attr(755,root,root) %{_bindir}/sphinx-autogen-2 | |
211 | %attr(755,root,root) %{_bindir}/sphinx-apidoc-2 | |
212 | %attr(755,root,root) %{_bindir}/sphinx-build-2 | |
213 | %attr(755,root,root) %{_bindir}/sphinx-quickstart-2 | |
e7b5373a | 214 | |
79af714d | 215 | %files 3 |
e7b5373a | 216 | %defattr(644,root,root,755) |
1c0e06e7 | 217 | %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst |
79af714d | 218 | %attr(755,root,root) %{_bindir}/sphinx-autogen-3 |
1f35fc81 | 219 | %attr(755,root,root) %{_bindir}/sphinx-apidoc-3 |
79af714d JB |
220 | %attr(755,root,root) %{_bindir}/sphinx-build-3 |
221 | %attr(755,root,root) %{_bindir}/sphinx-quickstart-3 | |
b9b9d288 | 222 | %endif |
8dffcc23 JB |
223 | |
224 | %files -n python-Sphinx | |
225 | %defattr(644,root,root,755) | |
226 | %{py_sitescriptdir}/sphinx | |
227 | %{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info | |
228 | ||
229 | %files -n python3-Sphinx | |
230 | %defattr(644,root,root,755) | |
e7b5373a | 231 | %{py3_sitescriptdir}/sphinx |
79af714d | 232 | %{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info |