[packages/sphinx-pdg] - updated to 2.4.4; now python3 only (for Sphinx 1.x for python 2 see python-Sphinx.spec) - removed
qboosh
qboosh at pld-linux.org
Sun Apr 5 18:20:07 CEST 2020
commit c0d66e02c339880f6e72476cc6338bbcd1bc4eba
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Apr 5 18:20:01 2020 +0200
- updated to 2.4.4; now python3 only (for Sphinx 1.x for python 2 see python-Sphinx.spec)
- removed outdated mock patch
sphinx-pdg-mock.patch | 122 --------------------------------
sphinx-pdg.spec | 192 ++++++++++----------------------------------------
2 files changed, 36 insertions(+), 278 deletions(-)
---
diff --git a/sphinx-pdg.spec b/sphinx-pdg.spec
index 2f699d6..c3d358c 100644
--- a/sphinx-pdg.spec
+++ b/sphinx-pdg.spec
@@ -1,69 +1,36 @@
# there are sphinx.spec, sphinx2.spec... Sphinx.spec is too confusing
# therefore the name for this package is sphinx-pdg (pdg - python
# documentation generator)
+# NOTE: for last python2 version see python-Sphinx.spec
#
# Conditional build:
-%bcond_without python2 # CPython 2.x version
-%bcond_without python3 # CPython 3.x version
-%bcond_without python3_default # Use Python 3.x for easy_install executable
%bcond_without doc # documentation
%bcond_with tests # unit tests (some fail on import of existing module???)
Summary: Sphinx - Python documentation generator
Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona
Name: sphinx-pdg
-# note: Sphinx 2+ doesn't support Python 2
-Version: 1.8.5
+Version: 2.4.4
Release: 1
License: BSD
Group: Development/Languages/Python
#Source0Download: https://pypi.org/simple/Sphinx/
Source0: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
-# Source0-md5: 554f7a4e752f48b2601e5ef5ab463346
+# Source0-md5: 09938ea71d970c5a4dac748d8a0967c6
Patch0: float-ver.patch
-Patch1: %{name}-mock.patch
URL: http://www.sphinx-doc.org/
%if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
BuildRequires: glibc-localedb-all
%endif
-%if %{with python2}
-BuildRequires: python-babel >= 1.3
-BuildRequires: python-devel >= 1:2.7
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools >= 1:7.0
-%if %{with tests}
-BuildRequires: python-alabaster >= 0.7
-BuildRequires: python-alabaster < 0.8
-BuildRequires: python-docutils >= 0.11
-BuildRequires: python-enum34
-# for style checks, not run by pytest
-#BuildRequires: python-flake8 >= 3.5.0
-#BuildRequires: python-flake8-import-order
-BuildRequires: python-html5lib
-BuildRequires: python-imagesize
-BuildRequires: python-jinja2 >= 2.3
-BuildRequires: python-mock
-BuildRequires: python-packaging
-BuildRequires: python-pygments >= 2.0
-BuildRequires: python-pytest >= 3.0
-# for coverage tests only
-#BuildRequires: python-pytest-cov
-BuildRequires: python-requests >= 2.0.0
-BuildRequires: python-six >= 1.5
-BuildRequires: python-snowballstemmer >= 1.1
-BuildRequires: python-sphinxcontrib-websupport
-BuildRequires: python-typing
-%endif
-%endif
-%if %{with python3}
BuildRequires: python3-babel >= 1.3
-BuildRequires: python3-devel >= 1:3.4
-BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-devel >= 1:3.5
+BuildRequires: python3-modules >= 1:3.5
BuildRequires: python3-setuptools >= 1:7.0
%if %{with tests}
BuildRequires: python3-alabaster >= 0.7
BuildRequires: python3-alabaster < 0.8
-BuildRequires: python3-docutils >= 0.11
+BuildRequires: python3-docutils >= 0.12
+BuildRequires: python3-docutils-stubs
# for style checks, not run by pytest
#BuildRequires: python3-flake8 >= 3.5.0
#BuildRequires: python3-flake8-import-order
@@ -71,21 +38,31 @@ BuildRequires: python3-html5lib
BuildRequires: python3-imagesize
BuildRequires: python3-jinja2 >= 2.3
# for type checks only, not run by pytest
-#BuildRequires: python3-mypy
+#BuildRequires: python3-mypy >= 0.761
BuildRequires: python3-packaging
BuildRequires: python3-pygments >= 2.0
BuildRequires: python3-pytest >= 3.0
+BuildRequires: python3-pytest < 5.3.3
# for coverage tests only
#BuildRequires: python3-pytest-cov
-BuildRequires: python3-requests >= 2.0.0
+BuildRequires: python3-requests >= 2.5.0
BuildRequires: python3-six >= 1.5
BuildRequires: python3-snowballstemmer >= 1.1
-BuildRequires: python3-sphinxcontrib-websupport
+BuildRequires: python3-sphinxcontrib-applehelp
+BuildRequires: python3-sphinxcontrib-devhelp
+BuildRequires: python3-sphinxcontrib-jsmath
+BuildRequires: python3-sphinxcontrib-htmlhelp
+BuildRequires: python3-sphinxcontrib-serializinghtml
+BuildRequires: python3-sphinxcontrib-qthelp
BuildRequires: python3-typed_ast
-%if "%{py3_ver}" < "3.5"
-BuildRequires: python3-typing
-%endif
%endif
+%if %{with doc}
+BuildRequires: python3-sphinxcontrib-applehelp
+BuildRequires: python3-sphinxcontrib-devhelp
+BuildRequires: python3-sphinxcontrib-htmlhelp
+BuildRequires: python3-sphinxcontrib-qthelp
+BuildRequires: python3-sphinxcontrib-serializinghtml
+BuildRequires: python3-sphinxcontrib-websupport
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
@@ -95,11 +72,7 @@ BuildRequires: sed >= 4.0
#BuildRequires: texlive-luatex
#BuildRequires: texlive-xetex
%endif
-%if %{with python3_default}
Requires: sphinx-pdg-3 = %{version}-%{release}
-%else
-Requires: sphinx-pdg-2 = %{version}-%{release}
-%endif
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -119,29 +92,6 @@ przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
będzie przydatne dla wielu innych projektów.
-%package 2
-Summary: Sphinx Python documentation generator (Python 2 version)
-Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 2)
-Group: Development/Languages/Python
-Requires: python-Sphinx = %{version}-%{release}
-Conflicts: sphinx-pdg < 1.3.2
-
-%description 2
-Sphinx is a tool that makes it easy to create intelligent and
-beautiful documentation for Python projects (or other documents
-consisting of multiple reStructuredText sources), written by Georg
-Brandl. It was originally created to translate the new Python
-documentation, but has now been cleaned up in the hope that it will be
-useful to many other projects.
-
-%description 2 -l pl.UTF-8
-Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
-dokumentacji dla projektów w Pythonie (lub innych dokumentów
-składających się z wielu źródeł w formacie reStructuredText), napisane
-przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
-dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
-będzie przydatne dla wielu innych projektów.
-
%package 3
Summary: Sphinx Python documentation generator (Python 3 version)
Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 3)
@@ -165,30 +115,11 @@ przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
będzie przydatne dla wielu innych projektów.
-%package -n python-Sphinx
-Summary: Sphinx Python documentation generator (Python 2.x modules)
-Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 2.x)
-Group: Development/Languages/Python
-Requires: python-modules >= 1:2.7
-Conflicts: sphinx-pdg < 1.0.7-2
-
-%description -n python-Sphinx
-Sphinx Python documentation generator (Python 2.x modules).
-
-For command-line utilities, see sphinx-pdg package.
-
-%description -n python-Sphinx -l pl.UTF-8
-Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
-Pythona 2.x).
-
-Narzędzia działające z linii poleceń znajdują się w pakiecie
-sphinx-pdg.
-
%package -n python3-Sphinx
Summary: Sphinx Python documentation generator (Python 3.x modules)
Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 3.x)
Group: Development/Languages/Python
-Requires: python3-modules >= 1:3.4
+Requires: python3-modules >= 1:3.5
Conflicts: sphinx-pdg-3 < 1.0.7-2
%description -n python3-Sphinx
@@ -217,7 +148,6 @@ Dokumentacja do generatora dokumentacji pythonowej Sphinx.
%prep
%setup -q -n Sphinx-%{version}
%patch0 -p1
-%patch1 -p1
# needs python-babel with at least de,en,ja locales installed
%{__rm} tests/test_util_i18n.py
@@ -225,18 +155,6 @@ Dokumentacja do generatora dokumentacji pythonowej Sphinx.
%{__rm} tests/test_build_latex.py
%build
-%if %{with python2}
-%py_build
-%{__rm} sphinx/__init__.pyc
-
-%if %{with tests}
-LC_ALL=C.UTF-8 \
-PYTHONPATH=$(pwd) \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%{__rm} -r sphinx/__pycache__
@@ -245,7 +163,6 @@ LC_ALL=C.UTF-8 \
PYTHONPATH=$(pwd) \
%{__python3} -m pytest tests
%endif
-%endif
%if %{with doc}
PYTHONPATH=$(pwd) \
@@ -255,44 +172,21 @@ PYTHONPATH=$(pwd) \
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-%{__rm} sphinx/__init__.pyc
-%py_postclean
-
-for f in $RPM_BUILD_ROOT%{_bindir}/*; do
- %{__mv} "${f}" "${f}-2"
-done
-%endif
-
-%if %{with python3}
%py3_install
+
%{__rm} -r sphinx/__pycache__
for f in $RPM_BUILD_ROOT%{_bindir}/*; do
- [ "${f%%-2}" == "$f" ] || continue
%{__mv} "${f}" "${f}-3"
+ ln -sf "$(basename "$f")-3" "$f"
done
-%if "%{py3_ver}" >= "3.5"
-# avoid python3egg(typing) dependency
-%{__sed} -i -e '/^\[:python_version<"3\.5"]/,/^$/ d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info/requires.txt
-%endif
-%endif
-
-%if %{with python3_default}
-for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do
- ln -sf "$(basename "$f")" "${f%%-3}"
-done
-%else
-for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do
- ln -sf "$(basename "$f")" "${f%%-2}"
-done
-%endif
-
%if %{with doc}
install -d $RPM_BUILD_ROOT%{_mandir}/man1
cp -p doc/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+for f in $RPM_BUILD_ROOT%{_mandir}/man1/*.1 ; do
+ ln "$f" $RPM_BUILD_ROOT%{_mandir}/man1/$(basename "$f" .1)-3.1
+done
%endif
%clean
@@ -312,42 +206,28 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/sphinx-quickstart.1*
%endif
-%if %{with python2}
-%files 2
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/sphinx-apidoc-2
-%attr(755,root,root) %{_bindir}/sphinx-autogen-2
-%attr(755,root,root) %{_bindir}/sphinx-build-2
-%attr(755,root,root) %{_bindir}/sphinx-quickstart-2
-%endif
-
-%if %{with python3}
%files 3
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/sphinx-apidoc-3
%attr(755,root,root) %{_bindir}/sphinx-autogen-3
%attr(755,root,root) %{_bindir}/sphinx-build-3
%attr(755,root,root) %{_bindir}/sphinx-quickstart-3
+%if %{with doc}
+%{_mandir}/man1/sphinx-all-3.1*
+%{_mandir}/man1/sphinx-apidoc-3.1*
+%{_mandir}/man1/sphinx-autogen-3.1*
+%{_mandir}/man1/sphinx-build-3.1*
+%{_mandir}/man1/sphinx-quickstart-3.1*
%endif
-%if %{with python2}
-%files -n python-Sphinx
-%defattr(644,root,root,755)
-%doc AUTHORS CHANGES EXAMPLES LICENSE README.rst
-%{py_sitescriptdir}/sphinx
-%{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
%files -n python3-Sphinx
%defattr(644,root,root,755)
%doc AUTHORS CHANGES EXAMPLES LICENSE README.rst
%{py3_sitescriptdir}/sphinx
%{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info
-%endif
%if %{with doc}
%files doc
%defattr(644,root,root,755)
-%doc doc/_build/html/{_images,_static,extdev,man,usage,web,*.html,*.js}
+%doc doc/_build/html/{_downloads,_images,_modules,_static,development,extdev,man,usage,*.html,*.js}
%endif
diff --git a/sphinx-pdg-mock.patch b/sphinx-pdg-mock.patch
deleted file mode 100644
index 01ccdb6..0000000
--- a/sphinx-pdg-mock.patch
+++ /dev/null
@@ -1,122 +0,0 @@
---- Sphinx-1.7.6/setup.py.orig 2018-07-21 09:11:20.607543626 +0200
-+++ Sphinx-1.7.6/setup.py 2018-07-21 09:14:00.757541787 +0200
-@@ -42,7 +42,6 @@
- 'whoosh>=2.0',
- ],
- 'test': [
-- 'mock',
- 'pytest',
- 'pytest-cov',
- 'html5lib',
---- Sphinx-1.7.6/tests/test_build.py.orig 2018-07-21 09:38:14.234191868 +0200
-+++ Sphinx-1.7.6/tests/test_build.py 2018-07-21 09:39:37.260857586 +0200
-@@ -13,7 +13,10 @@
- import sys
- from textwrap import dedent
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
- import pytest
- from docutils import nodes
-
---- Sphinx-1.7.6/tests/test_config.py.orig 2018-07-21 09:38:14.237525201 +0200
-+++ Sphinx-1.7.6/tests/test_config.py 2018-07-21 09:39:59.077523735 +0200
-@@ -9,7 +9,10 @@
- :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
- """
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
- import pytest
- from six import PY3, iteritems
-
---- Sphinx-1.7.6/tests/test_domain_std.py.orig 2018-07-21 09:38:14.237525201 +0200
-+++ Sphinx-1.7.6/tests/test_domain_std.py 2018-07-21 09:40:23.530857064 +0200
-@@ -9,7 +9,10 @@
- :license: BSD, see LICENSE for details.
- """
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
- from docutils import nodes
-
- from sphinx.domains.std import StandardDomain
---- Sphinx-1.5.5/tests/test_environment_indexentries.py.orig 2017-04-03 17:17:12.000000000 +0200
-+++ Sphinx-1.5.5/tests/test_environment_indexentries.py 2017-04-16 19:16:37.202256421 +0200
-@@ -13,7 +13,10 @@ from collections import namedtuple
- from sphinx import locale
- from sphinx.environment.managers.indexentries import IndexEntries
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
-
- Environment = namedtuple('Environment', 'indexentries')
-
---- Sphinx-1.7.6/tests/test_ext_intersphinx.py.orig 2018-07-21 09:38:14.237525201 +0200
-+++ Sphinx-1.7.6/tests/test_ext_intersphinx.py 2018-07-21 09:40:47.824190102 +0200
-@@ -13,7 +13,10 @@
- import unittest
- from io import BytesIO
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
- import pytest
- import requests
- from docutils import nodes
---- Sphinx-1.7.6/tests/test_ext_napoleon_docstring.py.orig 2018-07-21 09:38:14.240858534 +0200
-+++ Sphinx-1.7.6/tests/test_ext_napoleon_docstring.py 2018-07-21 09:41:38.977522865 +0200
-@@ -15,7 +15,10 @@
- from textwrap import dedent
- from unittest import TestCase
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
-
- from sphinx.ext.napoleon import Config
- from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring
---- Sphinx-1.7.6/tests/test_ext_napoleon.py.orig 2018-07-21 09:38:14.240858534 +0200
-+++ Sphinx-1.7.6/tests/test_ext_napoleon.py 2018-07-21 09:41:24.010856357 +0200
-@@ -13,7 +13,10 @@
- from collections import namedtuple
- from unittest import TestCase
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
-
- from sphinx.application import Sphinx
- from sphinx.ext.napoleon import _process_docstring, _skip_member, Config, setup
---- Sphinx-1.5.5/tests/test_util_fileutil.py.orig 2017-03-27 03:42:15.000000000 +0200
-+++ Sphinx-1.5.5/tests/test_util_fileutil.py 2017-04-16 19:17:19.555589270 +0200
-@@ -11,7 +11,10 @@
- from sphinx.util.fileutil import copy_asset, copy_asset_file
- from sphinx.jinja2glue import BuiltinTemplateLoader
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
-
-
- class DummyTemplateLoader(BuiltinTemplateLoader):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sphinx-pdg.git/commitdiff/c0d66e02c339880f6e72476cc6338bbcd1bc4eba
More information about the pld-cvs-commit
mailing list