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