diff --git a/python-WebTest.changes b/python-WebTest.changes index 40aabd7..97f8c0d 100644 --- a/python-WebTest.changes +++ b/python-WebTest.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 3 11:41:12 UTC 2023 - Martin Liška + +- Do not depend on pkg_resources.get_distribution and build_sphinx + that is gone in Sphinx 7.0 (boo#1211051). +- Add sphinx-7-fix.patch patch. + ------------------------------------------------------------------- Thu Aug 18 15:21:41 UTC 2022 - Ben Greiner diff --git a/python-WebTest.spec b/python-WebTest.spec index 6ee3115..d1b64b9 100644 --- a/python-WebTest.spec +++ b/python-WebTest.spec @@ -1,7 +1,7 @@ # # spec file for package python-WebTest # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ License: MIT Group: Development/Languages/Python URL: https://docs.pylonsproject.org/projects/webtest/ Source: https://files.pythonhosted.org/packages/source/W/WebTest/WebTest-%{version}.tar.gz +Patch0: sphinx-7-fix.patch BuildRequires: %{python_module PasteDeploy} BuildRequires: %{python_module WSGIProxy2} BuildRequires: %{python_module WebOb >= 1.2} @@ -63,10 +64,11 @@ This package contains documentation files for %{name}. %prep %setup -q -n WebTest-%{version} +%patch0 -p1 %build %python_build -python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo +sphinx-build -b html docs build/sphinx/html && rm build/sphinx/html/.buildinfo %install %python_install diff --git a/sphinx-7-fix.patch b/sphinx-7-fix.patch new file mode 100644 index 0000000..cb1d9af --- /dev/null +++ b/sphinx-7-fix.patch @@ -0,0 +1,19 @@ +diff --git a/docs/conf.py b/docs/conf.py +index 96746bf..fed362e 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -59,9 +59,11 @@ copyright = '2012-%s, Ian Bicking' % thisyear + # The version info for the project you're documenting, acts as replacement for + # |version| and |release|, also used in various other places throughout the + # built documents. +-import pkg_resources +-version = pkg_resources.get_distribution(project).version +-release = version ++import pathlib ++lines = (pathlib.Path(__file__).parent.parent / 'PKG-INFO').open().readlines() ++line = lines[2] ++assert line.startswith('Version: ') ++release = line.split(':')[1].strip() + + # The language for content autogenerated by Sphinx. Refer to documentation + # for a list of supported languages.