]> git.pld-linux.org Git - packages/sphinx-pdg.git/blob - sphinx-pdg.spec
0f858c7a0343a6003e14e4fcd5899538add70a7d
[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:        1
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 URL:            http://sphinx.pocoo.org/
21 %if %{with python2}
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
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-2to3
29 BuildRequires:  python3-babel >= 1.3
30 BuildRequires:  python3-devel
31 BuildRequires:  python3-modules
32 BuildRequires:  python3-setuptools >= 7.0
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.710
36 %if %{with python3_default}
37 Requires:       sphinx-pdg-3 = %{version}-%{release}
38 %else
39 Requires:       sphinx-pdg-2 = %{version}-%{release}
40 %endif
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
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.
51
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
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)
63 Group:          Development/Languages/Python
64 Requires:       python-Sphinx = %{version}-%{release}
65 Conflicts:      sphinx-pdg < 1.3.2
66
67 %description 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.
74
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.
82
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)
86 Group:          Development/Languages/Python
87 Requires:       python3-Sphinx = %{version}-%{release}
88 Conflicts:      sphinx-pdg < 1.3.2
89
90 %description 3
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
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.
105
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
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
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
143 %prep
144 %setup -q -n Sphinx-%{version}
145
146 %build
147 %if %{with python2}
148 %py_build
149 %{__rm} sphinx/__init__.pyc
150 %endif
151
152 %if %{with python3}
153 %py3_build
154 %{__rm} -r sphinx/__pycache__
155 %endif
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159
160 %if %{with python2}
161 %py_install
162 %{__rm} sphinx/__init__.pyc
163 %py_postclean
164
165 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
166         %{__mv} "${f}" "${f}-2"
167 done
168 %endif
169
170 %if %{with python3}
171 %py3_install
172 %{__rm} -r sphinx/__pycache__
173
174 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
175         [ "${f%%-2}" == "$f" ] || continue
176         %{__mv} "${f}" "${f}-3"
177 done
178 %endif
179
180 %if %{with python3_default}
181 for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do
182         ln -sf "$(basename "$f")" "${f%%-3}"
183 done
184 %else
185 for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do
186         ln -sf "$(basename "$f")" "${f%%-2}"
187 done
188 %endif
189
190 %clean
191 rm -rf $RPM_BUILD_ROOT
192
193 %files
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
199
200 %if %{with python2}
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-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
208 %endif
209
210 %if %{with python3}
211 %files 3
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
218 %endif
219
220 %if %{with python2}
221 %files -n python-Sphinx
222 %defattr(644,root,root,755)
223 %{py_sitescriptdir}/sphinx
224 %{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info
225 %endif
226
227 %if %{with python3}
228 %files -n python3-Sphinx
229 %defattr(644,root,root,755)
230 %{py3_sitescriptdir}/sphinx
231 %{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info
232 %endif
This page took 0.056887 seconds and 2 git commands to generate.