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)
6 %bcond_without python2 # CPython 2.x version
7 %bcond_without python3 # CPython 3.x version
8 %bcond_without python3_default # Use Python 3.x for easy_install executable
10 Summary: Sphinx - Python documentation generator
11 Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona
16 Group: Development/Languages/Python
17 #Source0Download: https://pypi.python.org/pypi/Sphinx
18 Source0: https://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
19 # Source0-md5: 3800ffa038a1eedb5139f9c247e7ee2f
20 URL: http://sphinx.pocoo.org/
22 BuildRequires: python-babel >= 1.3
23 BuildRequires: python-devel >= 1:2.5
24 BuildRequires: python-modules >= 1:2.5
25 BuildRequires: python-setuptools >= 7.0
28 BuildRequires: python3-2to3
29 BuildRequires: python3-babel >= 1.3
30 BuildRequires: python3-devel
31 BuildRequires: python3-modules
32 BuildRequires: python3-setuptools >= 7.0
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.710
36 %if %{with python3_default}
37 Requires: sphinx-pdg-3 = %{version}-%{release}
39 Requires: sphinx-pdg-2 = %{version}-%{release}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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.
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)
63 Group: Development/Languages/Python
64 Requires: python-Sphinx = %{version}-%{release}
65 Conflicts: sphinx-pdg < 1.3.2
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.
75 %description 2 -l pl.UTF-8
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.
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)
86 Group: Development/Languages/Python
87 Requires: python3-Sphinx = %{version}-%{release}
88 Conflicts: sphinx-pdg < 1.3.2
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.
98 %description 3 -l pl.UTF-8
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.
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
110 Requires: python-modules
111 Conflicts: sphinx-pdg < 1.0.7-2
113 %description -n python-Sphinx
114 Sphinx Python documentation generator (Python 2.x modules).
116 For command-line utilities, see sphinx-pdg package.
118 %description -n python-Sphinx -l pl.UTF-8
119 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
122 Narzędzia działające z linii poleceń znajdują się w pakiecie
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
129 Conflicts: sphinx-pdg-3 < 1.0.7-2
131 %description -n python3-Sphinx
132 Sphinx Python documentation generator (Python 3.x modules).
134 For command-line utilities, see sphinx-pdg-3 package.
136 %description -n python3-Sphinx -l pl.UTF-8
137 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
140 Narzędzia działające z linii poleceń znajdują się w pakiecie
144 %setup -q -n Sphinx-%{version}
149 %{__rm} sphinx/__init__.pyc
154 %{__rm} -r sphinx/__pycache__
158 rm -rf $RPM_BUILD_ROOT
162 %{__rm} sphinx/__init__.pyc
165 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
166 %{__mv} "${f}" "${f}-2"
172 %{__rm} -r sphinx/__pycache__
174 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
175 [ "${f%%-2}" == "$f" ] || continue
176 %{__mv} "${f}" "${f}-3"
180 %if %{with python3_default}
181 for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do
182 ln -sf "$(basename "$f")" "${f%%-3}"
185 for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do
186 ln -sf "$(basename "$f")" "${f%%-2}"
191 rm -rf $RPM_BUILD_ROOT
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_bindir}/sphinx-apidoc
196 %attr(755,root,root) %{_bindir}/sphinx-autogen
197 %attr(755,root,root) %{_bindir}/sphinx-build
198 %attr(755,root,root) %{_bindir}/sphinx-quickstart
202 %defattr(644,root,root,755)
203 %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst
204 %attr(755,root,root) %{_bindir}/sphinx-apidoc-2
205 %attr(755,root,root) %{_bindir}/sphinx-autogen-2
206 %attr(755,root,root) %{_bindir}/sphinx-build-2
207 %attr(755,root,root) %{_bindir}/sphinx-quickstart-2
212 %defattr(644,root,root,755)
213 %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst
214 %attr(755,root,root) %{_bindir}/sphinx-apidoc-3
215 %attr(755,root,root) %{_bindir}/sphinx-autogen-3
216 %attr(755,root,root) %{_bindir}/sphinx-build-3
217 %attr(755,root,root) %{_bindir}/sphinx-quickstart-3
221 %files -n python-Sphinx
222 %defattr(644,root,root,755)
223 %{py_sitescriptdir}/sphinx
224 %{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info
228 %files -n python3-Sphinx
229 %defattr(644,root,root,755)
230 %{py3_sitescriptdir}/sphinx
231 %{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info