[12469] | 1 | %bcond_with bootstrap |
---|
[1741] | 2 | |
---|
[12469] | 3 | %global upstream_name Sphinx |
---|
[11940] | 4 | %global py3_default 0 |
---|
| 5 | |
---|
[12469] | 6 | Summary: Python documentation generator |
---|
| 7 | Name: python-sphinx |
---|
| 8 | Version: 3.2.1 |
---|
| 9 | Release: 1%{?_dist_release} |
---|
| 10 | Group: publishing,programming |
---|
| 11 | Vendor: Project Vine |
---|
| 12 | Distribution: Vine Linux |
---|
[1741] | 13 | |
---|
| 14 | # Unless otherwise noted, the license for code is BSD |
---|
| 15 | # sphinx/util/stemmer.py Public Domain |
---|
| 16 | # sphinx/pycode/pgen2 Python |
---|
| 17 | # jquery (MIT or GPLv2) |
---|
| 18 | License: BSD and Public Domain and Python and (MIT or GPLv2) |
---|
| 19 | URL: http://sphinx.pocoo.org/ |
---|
[11940] | 20 | |
---|
[12469] | 21 | Source0: https://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz |
---|
[1741] | 22 | |
---|
[11940] | 23 | # Allow extra themes to exist. We pull in python[23]-sphinx-theme-alabaster |
---|
| 24 | # which causes that test to fail. |
---|
| 25 | Patch1: sphinx-test_theming.diff |
---|
| 26 | |
---|
[1741] | 27 | BuildArch: noarch |
---|
[12469] | 28 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
[11940] | 29 | BuildRequires: python-rpm-macros |
---|
[7722] | 30 | |
---|
[1741] | 31 | %description |
---|
| 32 | Sphinx is a tool that makes it easy to create intelligent and |
---|
| 33 | beautiful documentation for Python projects (or other documents |
---|
| 34 | consisting of multiple reStructuredText sources), written by Georg |
---|
| 35 | Brandl. It was originally created to translate the new Python |
---|
| 36 | documentation, but has now been cleaned up in the hope that it will be |
---|
| 37 | useful to many other projects. |
---|
| 38 | |
---|
| 39 | Sphinx uses reStructuredText as its markup language, and many of its |
---|
| 40 | strengths come from the power and straightforwardness of |
---|
| 41 | reStructuredText and its parsing and translating suite, the Docutils. |
---|
| 42 | |
---|
| 43 | Although it is still under constant development, the following |
---|
| 44 | features are already present, work fine and can be seen "in action" in |
---|
| 45 | the Python docs: |
---|
| 46 | |
---|
| 47 | * Output formats: HTML (including Windows HTML Help) and LaTeX, |
---|
| 48 | for printable PDF versions |
---|
| 49 | * Extensive cross-references: semantic markup and automatic links |
---|
| 50 | for functions, classes, glossary terms and similar pieces of |
---|
| 51 | information |
---|
| 52 | * Hierarchical structure: easy definition of a document tree, with |
---|
| 53 | automatic links to siblings, parents and children |
---|
| 54 | * Automatic indices: general index as well as a module index |
---|
| 55 | * Code handling: automatic highlighting using the Pygments highlighter |
---|
| 56 | * Various extensions are available, e.g. for automatic testing of |
---|
| 57 | snippets and inclusion of appropriately formatted docstrings. |
---|
| 58 | |
---|
| 59 | |
---|
[11940] | 60 | %package -n python3-sphinx |
---|
| 61 | Summary: Python documentation generator |
---|
[12469] | 62 | Group: publishing,programming |
---|
[11940] | 63 | |
---|
| 64 | BuildRequires: python3-rpm-macros |
---|
| 65 | BuildRequires: python3-devel |
---|
| 66 | BuildRequires: python3-setuptools |
---|
| 67 | |
---|
| 68 | BuildRequires: python3-six |
---|
| 69 | BuildRequires: python3-jinja2 |
---|
| 70 | BuildRequires: python3-docutils |
---|
| 71 | BuildRequires: python3-snowballstemmer |
---|
| 72 | BuildRequires: python3-babel |
---|
| 73 | BuildRequires: python3-sphinx-theme-alabaster |
---|
| 74 | BuildRequires: python3-imagesize |
---|
| 75 | BuildRequires: python3-requests |
---|
| 76 | BuildRequires: python3-packaging |
---|
| 77 | |
---|
[12469] | 78 | Requires: python3-setuptools |
---|
[11940] | 79 | Requires: python-sphinx-locale = %{version}-%{release} |
---|
| 80 | Requires: python3-six |
---|
| 81 | Requires: python3-jinja2 |
---|
| 82 | Requires: python3-docutils |
---|
| 83 | Requires: python3-snowballstemmer |
---|
| 84 | Requires: python3-babel |
---|
| 85 | Requires: python3-sphinx-theme-alabaster |
---|
| 86 | Requires: python3-imagesize |
---|
| 87 | Requires: python3-requests |
---|
| 88 | Requires: python3-packaging |
---|
[12469] | 89 | |
---|
| 90 | %if !%{with bootstrap} |
---|
| 91 | BuildRequires: python3-pygments |
---|
| 92 | BuildRequires: python3-sphinxcontrib-websupport |
---|
| 93 | BuildRequires: python3-sphinxcontrib-serializinghtml |
---|
| 94 | BuildRequires: python3-sphinxcontrib-applehelp |
---|
| 95 | BuildRequires: python3-sphinxcontrib-devhelp |
---|
| 96 | BuildRequires: python3-sphinxcontrib-htmlhelp |
---|
| 97 | BuildRequires: python3-sphinxcontrib-qthelp |
---|
| 98 | Requires: python3-pygments |
---|
[11940] | 99 | Requires: python3-sphinxcontrib-websupport |
---|
[12469] | 100 | Requires: python3-sphinxcontrib-serializinghtml |
---|
| 101 | Requires: python3-sphinxcontrib-applehelp |
---|
| 102 | Requires: python3-sphinxcontrib-devhelp |
---|
| 103 | Requires: python3-sphinxcontrib-htmlhelp |
---|
| 104 | Requires: python3-sphinxcontrib-qthelp |
---|
| 105 | %endif |
---|
[11940] | 106 | |
---|
| 107 | %description -n python3-sphinx |
---|
| 108 | Sphinx is a tool that makes it easy to create intelligent and |
---|
| 109 | beautiful documentation for Python projects (or other documents |
---|
| 110 | consisting of multiple reStructuredText sources), written by Georg |
---|
| 111 | Brandl. It was originally created to translate the new Python |
---|
| 112 | documentation, but has now been cleaned up in the hope that it will be |
---|
| 113 | useful to many other projects. |
---|
| 114 | |
---|
| 115 | Sphinx uses reStructuredText as its markup language, and many of its |
---|
| 116 | strengths come from the power and straightforwardness of |
---|
| 117 | reStructuredText and its parsing and translating suite, the Docutils. |
---|
| 118 | |
---|
| 119 | Although it is still under constant development, the following |
---|
| 120 | features are already present, work fine and can be seen "in action" in |
---|
| 121 | the Python docs: |
---|
| 122 | |
---|
| 123 | * Output formats: HTML (including Windows HTML Help) and LaTeX, |
---|
| 124 | for printable PDF versions |
---|
| 125 | * Extensive cross-references: semantic markup and automatic links |
---|
| 126 | for functions, classes, glossary terms and similar pieces of |
---|
| 127 | information |
---|
| 128 | * Hierarchical structure: easy definition of a document tree, with |
---|
| 129 | automatic links to siblings, parents and children |
---|
| 130 | * Automatic indices: general index as well as a module index |
---|
| 131 | * Code handling: automatic highlighting using the Pygments highlighter |
---|
| 132 | * Various extensions are available, e.g. for automatic testing of |
---|
| 133 | snippets and inclusion of appropriately formatted docstrings. |
---|
| 134 | |
---|
| 135 | %package locale |
---|
[12469] | 136 | Summary: Locale files for %{name} |
---|
| 137 | Group: publishing |
---|
| 138 | License: BSD |
---|
[11940] | 139 | |
---|
| 140 | %description locale |
---|
| 141 | Sphinx is a tool that makes it easy to create intelligent and |
---|
| 142 | beautiful documentation for Python projects (or other documents |
---|
| 143 | consisting of multiple reStructuredText sources), written by Georg |
---|
| 144 | Brandl. It was originally created to translate the new Python |
---|
| 145 | documentation, but has now been cleaned up in the hope that it will be |
---|
| 146 | useful to many other projects. |
---|
| 147 | |
---|
| 148 | This package contains locale files for Sphinx |
---|
| 149 | |
---|
[1741] | 150 | %package doc |
---|
| 151 | Summary: Documentation for %{name} |
---|
[12469] | 152 | Group: documentation |
---|
[1741] | 153 | License: BSD |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | %description doc |
---|
| 157 | Sphinx is a tool that makes it easy to create intelligent and |
---|
| 158 | beautiful documentation for Python projects (or other documents |
---|
| 159 | consisting of multiple reStructuredText sources), written by Georg |
---|
| 160 | Brandl. It was originally created to translate the new Python |
---|
| 161 | documentation, but has now been cleaned up in the hope that it will be |
---|
| 162 | useful to many other projects. |
---|
| 163 | |
---|
| 164 | This package contains documentation in reST and HTML formats. |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | %prep |
---|
[11940] | 168 | %autosetup -n %{upstream_name}-%{version} -p1 |
---|
[1741] | 169 | |
---|
[11940] | 170 | # fix line encoding of bundled jquery.js |
---|
| 171 | perl -pi -e 's/\r//' ./sphinx/themes/basic/static/jquery.js |
---|
| 172 | |
---|
| 173 | |
---|
[1741] | 174 | %build |
---|
[12469] | 175 | %py3_build |
---|
[11940] | 176 | |
---|
[12469] | 177 | %if !%{with bootstrap} |
---|
[11940] | 178 | export PYTHONPATH=$PWD |
---|
[1741] | 179 | pushd doc |
---|
[11940] | 180 | export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py" |
---|
| 181 | make html SPHINXBUILD="$SPHINXBUILD" |
---|
| 182 | make man SPHINXBUILD="$SPHINXBUILD" |
---|
| 183 | rm -rf _build/html/.buildinfo |
---|
| 184 | mv _build/html .. |
---|
[1741] | 185 | popd |
---|
[12469] | 186 | %endif |
---|
[1741] | 187 | |
---|
| 188 | %install |
---|
| 189 | %__rm -rf %{buildroot} |
---|
[12469] | 190 | %py3_install |
---|
[1741] | 191 | |
---|
[12469] | 192 | # Clean up non-python files |
---|
| 193 | rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store |
---|
| 194 | rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx |
---|
[1741] | 195 | |
---|
[12469] | 196 | %if !%{with bootstrap} |
---|
[11940] | 197 | pushd doc |
---|
[1741] | 198 | # Deliver man pages |
---|
[11940] | 199 | install -d %{buildroot}%{_mandir}/man1 |
---|
| 200 | for f in _build/man/sphinx-*.1; |
---|
| 201 | do |
---|
| 202 | cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f) |
---|
| 203 | done |
---|
| 204 | popd |
---|
[12469] | 205 | %endif |
---|
[11940] | 206 | |
---|
[1741] | 207 | # Deliver rst files |
---|
[11940] | 208 | rm -rf doc/_build |
---|
| 209 | sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile |
---|
| 210 | mv doc reST |
---|
[12469] | 211 | rm reST/make.bat |
---|
[1741] | 212 | |
---|
[11940] | 213 | # Move language files to /usr/share; |
---|
| 214 | # patch to support this incorporated in 0.6.6 |
---|
[12469] | 215 | pushd %{buildroot}%{python3_sitelib} |
---|
[1741] | 216 | |
---|
[12469] | 217 | for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\. |
---|
| 218 | *' -printf "%f "`; |
---|
[1741] | 219 | do |
---|
[12469] | 220 | test $lang == __pycache__ && continue |
---|
[1741] | 221 | install -d %{buildroot}%{_datadir}/sphinx/locale/$lang |
---|
| 222 | install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES |
---|
[11940] | 223 | mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \ |
---|
[1741] | 224 | %{buildroot}%{_datadir}/sphinx/locale/$lang/ |
---|
[11940] | 225 | mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \ |
---|
[1741] | 226 | %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/ |
---|
[11940] | 227 | rm -rf sphinx/locale/$lang |
---|
[1741] | 228 | done |
---|
| 229 | popd |
---|
[11940] | 230 | |
---|
[12469] | 231 | # Create the sphinxcontrib directory, so we can own it |
---|
| 232 | # See https://bugzilla.redhat.com/show_bug.cgi?id=1669790 for rationale |
---|
| 233 | mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib |
---|
[11940] | 234 | |
---|
[1741] | 235 | %find_lang sphinx |
---|
| 236 | |
---|
| 237 | # Language files; Since these are javascript, it's not immediately obvious to |
---|
| 238 | # find_lang that they need to be marked with a language. |
---|
[11940] | 239 | (cd %{buildroot} && find . -name 'sphinx.js') | sed -e 's|^.||' | sed -e \ |
---|
[1741] | 240 | 's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \ |
---|
| 241 | >> sphinx.lang |
---|
| 242 | |
---|
[12469] | 243 | |
---|
[1741] | 244 | %clean |
---|
| 245 | %__rm -rf %{buildroot} |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | %check |
---|
[11940] | 249 | #__make test |
---|
[1741] | 250 | |
---|
| 251 | |
---|
[11940] | 252 | %files -n python3-sphinx |
---|
| 253 | %license LICENSE |
---|
| 254 | %doc AUTHORS CHANGES EXAMPLES README.* |
---|
[12469] | 255 | %{_bindir}/sphinx-* |
---|
[11940] | 256 | %{python3_sitelib}/sphinx/ |
---|
| 257 | %{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/ |
---|
[12469] | 258 | %dir %{python3_sitelib}/sphinxcontrib/ |
---|
| 259 | %dir %{_datadir}/sphinx/ |
---|
| 260 | %if !%{with bootstrap} |
---|
| 261 | %{_mandir}/man1/sphinx-* |
---|
[11940] | 262 | %endif |
---|
| 263 | |
---|
| 264 | %files locale -f sphinx.lang |
---|
| 265 | %license LICENSE |
---|
| 266 | %dir %{_datadir}/sphinx/ |
---|
| 267 | %dir %{_datadir}/sphinx/locale |
---|
| 268 | %dir %{_datadir}/sphinx/locale/* |
---|
| 269 | |
---|
[1741] | 270 | %files doc |
---|
| 271 | %defattr(-,root,root,-) |
---|
[12469] | 272 | %license LICENSE |
---|
| 273 | %if !%{with bootstrap} |
---|
[1741] | 274 | %doc html reST |
---|
[12469] | 275 | %endif |
---|
[1741] | 276 | |
---|
| 277 | |
---|
| 278 | %changelog |
---|
[12469] | 279 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.1-1 |
---|
| 280 | - new upstream release. |
---|
| 281 | - built with python3 only. |
---|
| 282 | |
---|
[11948] | 283 | * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-2 |
---|
| 284 | - fixed R:. |
---|
| 285 | |
---|
[11940] | 286 | * Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-1 |
---|
| 287 | - new upstream release. |
---|
| 288 | - dropped Patch2. |
---|
| 289 | - imported Patch0-1 from rawhide. |
---|
| 290 | - added python3 support. |
---|
| 291 | |
---|
[11625] | 292 | * Wed May 09 2018 Toshiaki Ara <ara_t@384.jp> 1.1.3-3 |
---|
| 293 | - added patch2 from RedHat |
---|
| 294 | |
---|
| 295 | * Thu Jul 2 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.3-2 |
---|
[9638] | 296 | - added patch0. |
---|
| 297 | |
---|
[7722] | 298 | * Sun Jun 30 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.3-1 |
---|
| 299 | - new upstream release |
---|
| 300 | |
---|
[5701] | 301 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2 |
---|
| 302 | - rebuild with python-2.7.2 |
---|
| 303 | |
---|
[3795] | 304 | * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.7-1 |
---|
| 305 | - new upstream release |
---|
| 306 | - add BuildRequires: python-simplejson for Vine5 |
---|
| 307 | - add Vendor and Distribution tags |
---|
| 308 | |
---|
[2258] | 309 | * Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.0.5-1 |
---|
| 310 | - update sphinx to 1.0.5 |
---|
| 311 | |
---|
[1741] | 312 | * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-1.b2 |
---|
| 313 | - initial build based on Fedora development |
---|
| 314 | |
---|
| 315 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-0.1.b2.1 |
---|
| 316 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
| 317 | |
---|
| 318 | * Mon May 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0-0.2.b2 |
---|
| 319 | - Update to 1.0 beta 2 |
---|
| 320 | - Fixes problem building html documentation in non-English locales |
---|
| 321 | |
---|
| 322 | * Wed May 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.b1 |
---|
| 323 | - Update to 1.0 beta 1 |
---|
| 324 | |
---|
| 325 | * Tue May 25 2010 Michel Salim <salimma@fedoraproject.org> - 0.6.6-1 |
---|
| 326 | - Update to 0.6.6 |
---|
| 327 | |
---|
| 328 | * Fri May 21 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-2 |
---|
| 329 | - Few minor tweaks to Gareth's spec file update |
---|
| 330 | |
---|
| 331 | * Mon May 10 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 0.6.5-1.hp |
---|
| 332 | - Update to 0.6.5 |
---|
| 333 | - Initial import of python-sphinx from Fedora Rawhide for use in HP CMS |
---|
| 334 | - Enforce that Sphinx requires Python 2.4 or later via an explicit BR |
---|
| 335 | - Minor tweaks to spec file |
---|
| 336 | - Move language files to %%{_datadir}, idea borrowed from Debian's sphinx |
---|
| 337 | package |
---|
| 338 | - Deliver man pages for sphinx-build & sphinx-quickstart |
---|
| 339 | - Deliver rst documentation files to reST directory in doc sub-package |
---|
| 340 | - Add %%check section for Python2 and add BR on python-nose |
---|
| 341 | |
---|
| 342 | * Wed Jan 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1 |
---|
| 343 | - Update to 0.6.4 |
---|
| 344 | - Fixes a problem using autodoc with pylons projects. |
---|
| 345 | |
---|
| 346 | * Fri Sep 4 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.3-1 |
---|
| 347 | - Update to 0.6.3 |
---|
| 348 | |
---|
| 349 | * Mon Aug 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.2-1 |
---|
| 350 | - Update to 0.6.2 -- upstream bugfix requested inside bz#512438 |
---|
| 351 | |
---|
| 352 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3 |
---|
| 353 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
| 354 | |
---|
| 355 | * Fri Jun 05 2009 Luke Macken <lmacken@redhat.com> - 0.6.1-2 |
---|
| 356 | - Add a patch to use our own setuptools package |
---|
| 357 | |
---|
| 358 | * Fri Apr 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.1-1 |
---|
| 359 | - Update to 0.6.1 |
---|
| 360 | |
---|
| 361 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2 |
---|
| 362 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 363 | |
---|
| 364 | * Fri Jan 2 2009 Michel Salim <salimma@fedoraproject.org> - 0.5.1-1 |
---|
| 365 | - Update to 0.5.1 |
---|
| 366 | |
---|
| 367 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2 |
---|
| 368 | - Rebuild for Python 2.6 |
---|
| 369 | |
---|
| 370 | * Mon Nov 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.5-1 |
---|
| 371 | - Update to 0.5 |
---|
| 372 | |
---|
| 373 | * Fri Oct 10 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.3-1 |
---|
| 374 | - Update to 0.4.3 |
---|
| 375 | |
---|
| 376 | * Wed Aug 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1.1 |
---|
| 377 | - Fix for EL-5 build. |
---|
| 378 | |
---|
| 379 | * Mon Aug 25 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1 |
---|
| 380 | - Update to 0.4.2 |
---|
| 381 | |
---|
| 382 | * Mon May 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.3-1 |
---|
| 383 | - Update to 0.3 |
---|
| 384 | |
---|
| 385 | * Fri May 2 2008 Michel Salim <salimma@fedoraproject.org> - 0.1.61950-3 |
---|
| 386 | - Split documentation into subpackage |
---|
| 387 | - Exclude C files (not built by default anyway) |
---|
| 388 | |
---|
| 389 | * Wed Apr 16 2008 José Matos <jamatos@fc.up.pt> - 0.1.61950-2 |
---|
| 390 | - Build html documentation, include it and include the rst |
---|
| 391 | documentation. |
---|
| 392 | |
---|
| 393 | * Thu Mar 27 2008 Michel Salim <michel.sylvan@gmail.com> 0.1.61950-1 |
---|
| 394 | - Initial package |
---|