commit 24b8cdef95ad7c54a086abd13c97552d955e20c1 Author: Jakub Bogusz <qbo...@pld-linux.org> Date: Sat Jul 21 22:23:04 2018 +0200
- updated to 1.7.6 - updated mock patch - removed outdated deps,tests patches sphinx-pdg-deps.patch | 11 ------ sphinx-pdg-mock.patch | 102 ++++++++++++++++++++++++------------------------- sphinx-pdg-tests.patch | 18 --------- sphinx-pdg.spec | 63 +++++++++++++++++++----------- 4 files changed, 89 insertions(+), 105 deletions(-) --- diff --git a/sphinx-pdg.spec b/sphinx-pdg.spec index 5866478..3e138ec 100644 --- a/sphinx-pdg.spec +++ b/sphinx-pdg.spec @@ -11,66 +11,77 @@ Summary: Sphinx - Python documentation generator Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona Name: sphinx-pdg -Version: 1.5.5 -Release: 3 +Version: 1.7.6 +Release: 1 License: BSD Group: Development/Languages/Python -#Source0Download: https://pypi.python.org/simple/Sphinx/ -Source0: https://pypi.python.org/packages/64/78/9d63754981e97c8e7cf14500d262fc573145624d4c765d5047f58e3fdf4e/Sphinx-%{version}.tar.gz -# Source0-md5: f9581b3556df9722143c47290273bcf8 +#Source0Download: https://pypi.org/simple/Sphinx/ +Source0: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz +# Source0-md5: 8fbd77d80c8e0966964751ab31a0204a Patch0: float-ver.patch -Patch1: %{name}-deps.patch -Patch2: %{name}-tests.patch -Patch3: %{name}-mock.patch -URL: http://sphinx.pocoo.org/ -%if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?) +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.5 -BuildRequires: python-modules >= 1:2.5 +BuildRequires: python-devel >= 1:2.7 +BuildRequires: python-modules >= 1:2.7 BuildRequires: python-setuptools >= 7.0 %if %{with tests} BuildRequires: python-alabaster >= 0.7 BuildRequires: python-alabaster < 0.8 BuildRequires: python-docutils >= 0.11 BuildRequires: python-enum34 -BuildRequires: python-flake8 +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 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-2to3 BuildRequires: python3-babel >= 1.3 -BuildRequires: python3-devel -BuildRequires: python3-modules +BuildRequires: python3-devel >= 1:3.4 +BuildRequires: python3-modules >= 1:3.4 BuildRequires: python3-setuptools >= 7.0 %if %{with tests} BuildRequires: python3-alabaster >= 0.7 BuildRequires: python3-alabaster < 0.8 BuildRequires: python3-docutils >= 0.11 -BuildRequires: python3-flake8 +BuildRequires: python3-flake8 >= 3.5.0 +BuildRequires: python3-flake8-import-order BuildRequires: python3-html5lib BuildRequires: python3-imagesize BuildRequires: python3-jinja2 >= 2.3 +BuildRequires: python3-mypy +BuildRequires: python3-packaging BuildRequires: python3-pygments >= 2.0 BuildRequires: python3-pytest >= 3.0 BuildRequires: python3-requests >= 2.0.0 BuildRequires: python3-six >= 1.5 BuildRequires: python3-snowballstemmer >= 1.1 +BuildRequires: python3-sphinxcontrib-websupport +BuildRequires: python3-typed_ast +%if "%{py3_ver}" < "3.5" +BuildRequires: python3-typing +%endif %endif %endif BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 +BuildRequires: sed >= 4.0 %if %{with tests} # for test_build_latex.py (disabled now) #BuildRequires: texlive-luatex @@ -150,7 +161,7 @@ będzie przydatne dla wielu innych projektów. 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 +Requires: python-modules >= 1:2.7 Conflicts: sphinx-pdg < 1.0.7-2 %description -n python-Sphinx @@ -169,6 +180,7 @@ sphinx-pdg. 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 Conflicts: sphinx-pdg-3 < 1.0.7-2 %description -n python3-Sphinx @@ -187,8 +199,6 @@ sphinx-pdg-3. %setup -q -n Sphinx-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 # needs python-babel with at least de,en,ja locales installed %{__rm} tests/test_util_i18n.py @@ -201,7 +211,8 @@ sphinx-pdg-3. %{__rm} sphinx/__init__.pyc %if %{with tests} -LC_ALL=C.UTF-8 %{__python} tests/run.py +LC_ALL=C.UTF-8 \ +%{__python} -m pytest tests %endif %endif @@ -210,7 +221,8 @@ LC_ALL=C.UTF-8 %{__python} tests/run.py %{__rm} -r sphinx/__pycache__ %if %{with tests} -LC_ALL=C.UTF-8 %{__python3} tests/run.py +LC_ALL=C.UTF-8 \ +%{__python3} -m pytest tests %endif %endif @@ -235,6 +247,11 @@ for f in $RPM_BUILD_ROOT%{_bindir}/*; do [ "${f%%-2}" == "$f" ] || continue %{__mv} "${f}" "${f}-3" 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} @@ -260,7 +277,6 @@ rm -rf $RPM_BUILD_ROOT %if %{with python2} %files 2 %defattr(644,root,root,755) -%doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst %attr(755,root,root) %{_bindir}/sphinx-apidoc-2 %attr(755,root,root) %{_bindir}/sphinx-autogen-2 %attr(755,root,root) %{_bindir}/sphinx-build-2 @@ -270,7 +286,6 @@ rm -rf $RPM_BUILD_ROOT %if %{with python3} %files 3 %defattr(644,root,root,755) -%doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst %attr(755,root,root) %{_bindir}/sphinx-apidoc-3 %attr(755,root,root) %{_bindir}/sphinx-autogen-3 %attr(755,root,root) %{_bindir}/sphinx-build-3 @@ -280,6 +295,7 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -287,6 +303,7 @@ rm -rf $RPM_BUILD_ROOT %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 diff --git a/sphinx-pdg-deps.patch b/sphinx-pdg-deps.patch deleted file mode 100644 index 84d0518..0000000 --- a/sphinx-pdg-deps.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Sphinx-1.5.5/setup.py.orig 2017-04-03 17:17:12.000000000 +0200 -+++ Sphinx-1.5.5/setup.py 2017-04-09 11:50:42.216134320 +0200 -@@ -63,8 +63,6 @@ - ], - 'test': [ - 'pytest', -- 'mock', # it would be better for 'test:python_version in 2.7' -- 'simplejson', # better: 'test:platform_python_implementation=="PyPy"' - 'html5lib', - ], - } diff --git a/sphinx-pdg-mock.patch b/sphinx-pdg-mock.patch index 302100c..01ccdb6 100644 --- a/sphinx-pdg-mock.patch +++ b/sphinx-pdg-mock.patch @@ -1,45 +1,55 @@ ---- Sphinx-1.5.5/tests/test_build.py.orig 2017-03-28 03:53:51.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_build.py 2017-04-16 19:16:14.272256683 +0200 -@@ -11,7 +11,10 @@ +--- 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 pickle - from docutils import nodes -import mock +try: + import mock +except ImportError: + from unittest import mock import pytest - from textwrap import dedent - from sphinx.errors import SphinxError ---- Sphinx-1.5.5/tests/test_config.py.orig 2017-04-03 17:17:12.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_config.py 2017-04-16 19:16:22.865589918 +0200 -@@ -11,7 +11,10 @@ + 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. """ - from six import PY3, iteritems - import pytest -import mock +try: + import mock +except ImportError: + from unittest import mock + import pytest + from six import PY3, iteritems - import sphinx - from sphinx.config import Config ---- Sphinx-1.5.5/tests/test_domain_std.py.orig 2017-03-27 03:42:15.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_domain_std.py 2017-04-16 19:16:28.592256519 +0200 -@@ -10,7 +10,10 @@ +--- 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. """ - from docutils import nodes -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 @@ -54,12 +64,12 @@ Environment = namedtuple('Environment', 'indexentries') ---- Sphinx-1.5.5/tests/test_ext_intersphinx.py.orig 2017-04-03 17:17:12.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_ext_intersphinx.py 2017-04-16 19:16:44.515589673 +0200 -@@ -15,7 +15,10 @@ import zlib +--- 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 - from six import BytesIO - from docutils import nodes -import mock +try: + import mock @@ -67,49 +77,35 @@ + from unittest import mock import pytest import requests - from io import BytesIO ---- Sphinx-1.5.5/tests/test_ext_napoleon_docstring.py.orig 2017-04-03 17:17:12.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_ext_napoleon_docstring.py 2017-04-16 19:16:54.252256226 +0200 -@@ -19,7 +19,10 @@ from unittest import TestCase - - from sphinx.ext.napoleon import Config - from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring --import mock -+try: -+ import mock -+except ImportError: -+ from unittest import mock - + 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 - class NamedtupleSubclass(namedtuple('NamedtupleSubclass', ('attr1', 'attr2'))): ---- Sphinx-1.5.5/tests/test_ext_napoleon.py.orig 2017-03-27 03:42:15.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_ext_napoleon.py 2017-04-16 19:17:01.395589480 +0200 -@@ -16,7 +16,10 @@ from unittest import TestCase - from sphinx.application import Sphinx - from sphinx.ext.napoleon import (_process_docstring, _skip_member, Config, - setup) -import mock +try: + import mock +except ImportError: + from unittest import mock - - def _private_doc(): ---- Sphinx-1.5.5/tests/test_theming.py.orig 2017-03-27 03:42:15.000000000 +0200 -+++ Sphinx-1.5.5/tests/test_theming.py 2017-04-16 19:17:07.258922745 +0200 -@@ -12,7 +12,10 @@ - import os - import zipfile + 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 - import pytest - from sphinx.theming import Theme, ThemeError + 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 @@ diff --git a/sphinx-pdg-tests.patch b/sphinx-pdg-tests.patch deleted file mode 100644 index e3cd6b8..0000000 --- a/sphinx-pdg-tests.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- Sphinx-1.5.5/tests/run.py.orig 2017-04-03 17:17:12.000000000 +0200 -+++ Sphinx-1.5.5/tests/run.py 2017-04-12 17:43:14.379599864 +0200 -@@ -54,10 +54,14 @@ - sys.stdout.flush() - - # exclude 'root' and 'roots' dirs for pytest test collector -+ignore_subdirs = ['root', 'roots'] -+if sys.version_info[:2] < (3, 5): -+ ignore_subdirs.append('py35') - ignore_paths = [ - os.path.relpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), sub)) -- for sub in ('root', 'roots') -+ for sub in ignore_subdirs - ] -+ - args = sys.argv[1:] - for ignore_path in ignore_paths: - args.extend(['--ignore', ignore_path]) ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/sphinx-pdg.git/commitdiff/24b8cdef95ad7c54a086abd13c97552d955e20c1 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit