]> git.pld-linux.org Git - packages/sphinx-pdg.git/blob - sphinx-pdg.spec
- fix comparison of float and sting
[packages/sphinx-pdg.git] / sphinx-pdg.spec
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)
4 #
5 # Conditional build:
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
9
10 Summary:        Sphinx - Python documentation generator
11 Summary(pl.UTF-8):      Sphinx - narzędzie do tworzenia dokumentacji dla Pythona
12 Name:           sphinx-pdg
13 Version:        1.3.3
14 Release:        2
15 License:        BSD
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/
22 %if %{with python2}
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
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-2to3
30 BuildRequires:  python3-babel >= 1.3
31 BuildRequires:  python3-devel
32 BuildRequires:  python3-modules
33 BuildRequires:  python3-setuptools >= 7.0
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.710
37 %if %{with python3_default}
38 Requires:       sphinx-pdg-3 = %{version}-%{release}
39 %else
40 Requires:       sphinx-pdg-2 = %{version}-%{release}
41 %endif
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
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.
52
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.
60
61 %package 2
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
67
68 %description 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.
75
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.
83
84 %package 3
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
90
91 %description 3
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.
98
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.
106
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
113
114 %description -n python-Sphinx
115 Sphinx Python documentation generator (Python 2.x modules).
116
117 For command-line utilities, see sphinx-pdg package.
118
119 %description -n python-Sphinx -l pl.UTF-8
120 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
121 Pythona 2.x).
122
123 Narzędzia działające z linii poleceń znajdują się w pakiecie
124 sphinx-pdg.
125
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
131
132 %description -n python3-Sphinx
133 Sphinx Python documentation generator (Python 3.x modules).
134
135 For command-line utilities, see sphinx-pdg-3 package.
136
137 %description -n python3-Sphinx -l pl.UTF-8
138 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
139 Pythona 3.x).
140
141 Narzędzia działające z linii poleceń znajdują się w pakiecie
142 sphinx-pdg-3.
143
144 %prep
145 %setup -q -n Sphinx-%{version}
146 %patch0 -p1
147
148 %build
149 %if %{with python2}
150 %py_build
151 %{__rm} sphinx/__init__.pyc
152 %endif
153
154 %if %{with python3}
155 %py3_build
156 %{__rm} -r sphinx/__pycache__
157 %endif
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161
162 %if %{with python2}
163 %py_install
164 %{__rm} sphinx/__init__.pyc
165 %py_postclean
166
167 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
168         %{__mv} "${f}" "${f}-2"
169 done
170 %endif
171
172 %if %{with python3}
173 %py3_install
174 %{__rm} -r sphinx/__pycache__
175
176 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
177         [ "${f%%-2}" == "$f" ] || continue
178         %{__mv} "${f}" "${f}-3"
179 done
180 %endif
181
182 %if %{with python3_default}
183 for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do
184         ln -sf "$(basename "$f")" "${f%%-3}"
185 done
186 %else
187 for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do
188         ln -sf "$(basename "$f")" "${f%%-2}"
189 done
190 %endif
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %files
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
201
202 %if %{with python2}
203 %files 2
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
210 %endif
211
212 %if %{with python3}
213 %files 3
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
220 %endif
221
222 %if %{with python2}
223 %files -n python-Sphinx
224 %defattr(644,root,root,755)
225 %{py_sitescriptdir}/sphinx
226 %{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info
227 %endif
228
229 %if %{with python3}
230 %files -n python3-Sphinx
231 %defattr(644,root,root,755)
232 %{py3_sitescriptdir}/sphinx
233 %{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info
234 %endif
This page took 0.077679 seconds and 3 git commands to generate.