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 Patch0: float-ver.patch
21 URL: http://sphinx.pocoo.org/
23 BuildRequires: python-babel >= 1.3
24 BuildRequires: python-devel >= 1:2.5
25 BuildRequires: python-modules >= 1:2.5
26 BuildRequires: python-setuptools >= 7.0
29 BuildRequires: python3-2to3
30 BuildRequires: python3-babel >= 1.3
31 BuildRequires: python3-devel
32 BuildRequires: python3-modules
33 BuildRequires: python3-setuptools >= 7.0
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.710
37 %if %{with python3_default}
38 Requires: sphinx-pdg-3 = %{version}-%{release}
40 Requires: sphinx-pdg-2 = %{version}-%{release}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Sphinx is a tool that makes it easy to create intelligent and
47 beautiful documentation for Python projects (or other documents
48 consisting of multiple reStructuredText sources), written by Georg
49 Brandl. It was originally created to translate the new Python
50 documentation, but has now been cleaned up in the hope that it will be
51 useful to many other projects.
53 %description -l pl.UTF-8
54 Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
55 dokumentacji dla projektów w Pythonie (lub innych dokumentów
56 składających się z wielu źródeł w formacie reStructuredText), napisane
57 przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
58 dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
59 będzie przydatne dla wielu innych projektów.
62 Summary: Sphinx Python documentation generator (Python 2 version)
63 Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 2)
64 Group: Development/Languages/Python
65 Requires: python-Sphinx = %{version}-%{release}
66 Conflicts: sphinx-pdg < 1.3.2
69 Sphinx is a tool that makes it easy to create intelligent and
70 beautiful documentation for Python projects (or other documents
71 consisting of multiple reStructuredText sources), written by Georg
72 Brandl. It was originally created to translate the new Python
73 documentation, but has now been cleaned up in the hope that it will be
74 useful to many other projects.
76 %description 2 -l pl.UTF-8
77 Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
78 dokumentacji dla projektów w Pythonie (lub innych dokumentów
79 składających się z wielu źródeł w formacie reStructuredText), napisane
80 przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
81 dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
82 będzie przydatne dla wielu innych projektów.
85 Summary: Sphinx Python documentation generator (Python 3 version)
86 Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 3)
87 Group: Development/Languages/Python
88 Requires: python3-Sphinx = %{version}-%{release}
89 Conflicts: sphinx-pdg < 1.3.2
92 Sphinx is a tool that makes it easy to create intelligent and
93 beautiful documentation for Python projects (or other documents
94 consisting of multiple reStructuredText sources), written by Georg
95 Brandl. It was originally created to translate the new Python
96 documentation, but has now been cleaned up in the hope that it will be
97 useful to many other projects.
99 %description 3 -l pl.UTF-8
100 Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
101 dokumentacji dla projektów w Pythonie (lub innych dokumentów
102 składających się z wielu źródeł w formacie reStructuredText), napisane
103 przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
104 dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
105 będzie przydatne dla wielu innych projektów.
107 %package -n python-Sphinx
108 Summary: Sphinx Python documentation generator (Python 2.x modules)
109 Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 2.x)
110 Group: Development/Languages/Python
111 Requires: python-modules
112 Conflicts: sphinx-pdg < 1.0.7-2
114 %description -n python-Sphinx
115 Sphinx Python documentation generator (Python 2.x modules).
117 For command-line utilities, see sphinx-pdg package.
119 %description -n python-Sphinx -l pl.UTF-8
120 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
123 Narzędzia działające z linii poleceń znajdują się w pakiecie
126 %package -n python3-Sphinx
127 Summary: Sphinx Python documentation generator (Python 3.x modules)
128 Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 3.x)
129 Group: Development/Languages/Python
130 Conflicts: sphinx-pdg-3 < 1.0.7-2
132 %description -n python3-Sphinx
133 Sphinx Python documentation generator (Python 3.x modules).
135 For command-line utilities, see sphinx-pdg-3 package.
137 %description -n python3-Sphinx -l pl.UTF-8
138 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
141 Narzędzia działające z linii poleceń znajdują się w pakiecie
145 %setup -q -n Sphinx-%{version}
151 %{__rm} sphinx/__init__.pyc
156 %{__rm} -r sphinx/__pycache__
160 rm -rf $RPM_BUILD_ROOT
164 %{__rm} sphinx/__init__.pyc
167 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
168 %{__mv} "${f}" "${f}-2"
174 %{__rm} -r sphinx/__pycache__
176 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
177 [ "${f%%-2}" == "$f" ] || continue
178 %{__mv} "${f}" "${f}-3"
182 %if %{with python3_default}
183 for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do
184 ln -sf "$(basename "$f")" "${f%%-3}"
187 for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do
188 ln -sf "$(basename "$f")" "${f%%-2}"
193 rm -rf $RPM_BUILD_ROOT
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/sphinx-apidoc
198 %attr(755,root,root) %{_bindir}/sphinx-autogen
199 %attr(755,root,root) %{_bindir}/sphinx-build
200 %attr(755,root,root) %{_bindir}/sphinx-quickstart
204 %defattr(644,root,root,755)
205 %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst
206 %attr(755,root,root) %{_bindir}/sphinx-apidoc-2
207 %attr(755,root,root) %{_bindir}/sphinx-autogen-2
208 %attr(755,root,root) %{_bindir}/sphinx-build-2
209 %attr(755,root,root) %{_bindir}/sphinx-quickstart-2
214 %defattr(644,root,root,755)
215 %doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst
216 %attr(755,root,root) %{_bindir}/sphinx-apidoc-3
217 %attr(755,root,root) %{_bindir}/sphinx-autogen-3
218 %attr(755,root,root) %{_bindir}/sphinx-build-3
219 %attr(755,root,root) %{_bindir}/sphinx-quickstart-3
223 %files -n python-Sphinx
224 %defattr(644,root,root,755)
225 %{py_sitescriptdir}/sphinx
226 %{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info
230 %files -n python3-Sphinx
231 %defattr(644,root,root,755)
232 %{py3_sitescriptdir}/sphinx
233 %{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info