From 5adfd768ae8244f8f6959210995b93039b54eae5 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Jun 17 2021 14:58:04 +0000 Subject: Roll the remaining sed expression related to sphinxcontrib-{asyncio,trio} into the new patch file --- diff --git a/asyncpg-0.23.0-use-sphinxcontrib-trio.patch b/asyncpg-0.23.0-use-sphinxcontrib-trio.patch index 94f443c..ed0a1ec 100644 --- a/asyncpg-0.23.0-use-sphinxcontrib-trio.patch +++ b/asyncpg-0.23.0-use-sphinxcontrib-trio.patch @@ -1,3 +1,15 @@ +diff -Naur asyncpg-0.23.0-original/docs/conf.py asyncpg-0.23.0/docs/conf.py +--- asyncpg-0.23.0-original/docs/conf.py 2021-06-17 10:42:26.995716904 -0400 ++++ asyncpg-0.23.0/docs/conf.py 2021-06-17 10:54:21.439938440 -0400 +@@ -27,7 +27,7 @@ + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages', + 'sphinx.ext.intersphinx', +- 'sphinxcontrib.asyncio', ++ 'sphinxcontrib_trio', + ] + + add_module_names = False diff -Naur asyncpg-0.23.0-original/setup.py asyncpg-0.23.0/setup.py --- asyncpg-0.23.0-original/setup.py 2021-06-17 10:42:26.995716904 -0400 +++ asyncpg-0.23.0/setup.py 2021-06-17 10:45:43.004720474 -0400 diff --git a/python-asyncpg.spec b/python-asyncpg.spec index 49891e9..d72302e 100644 --- a/python-asyncpg.spec +++ b/python-asyncpg.spec @@ -9,8 +9,9 @@ License: ASL 2.0 URL: https://github.com/MagicStack/%{srcname} Source0: %{pypi_source} -# Replace sphinxcontrib-asyncio, which is not working properly -# (Error in "py:comethod directive: unknown option: "async".): +# Replace sphinxcontrib-asyncio, which is not working properly: +# (Error in "py:comethod directive: unknown option: "async".): +# with sphinxcontrib-trio Patch0: %{srcname}-0.23.0-use-sphinxcontrib-trio.patch BuildRequires: gcc @@ -85,13 +86,9 @@ sed -r -i 's/~=/>=/g' setup.py # Do not put the source directory at the front of the path, as this keeps us # from using our own PYTHONPATH setting to allow importing the compiled # extension modules. -# -# Replace python3dist(sphinxcontrib-asyncio), which is not working properly: -# (Error in "py:comethod directive: unknown option: "async".): sed -r -i \ -e 's|https://docs.python.org/3|/%{_docdir}/python3-docs/html|' \ -e 's|(sys\.path\.)insert\(0,[[:blank:]]*|\1append\(|' \ - -e 's|(sphinxcontrib)\.asyncio|\1_trio|' \ docs/conf.py @@ -167,9 +164,10 @@ k='not TestFlake8' %changelog * Thu Jun 17 2021 Benjamin A. Beasley - 0.23.0-4 -- Rewrite the sed expression from PR#1 as a patch, so it is easier to notice if - the upstream sphinxcontrib-asyncio version requirement changes and we do not - silently switch back to sphinxcontrib-asyncio from sphinxcontrib-trio +- Use a patch instead of sed expressions to replace sphinxcontrib-asyncio with + sphinxcontrib-trio, so it is easier to notice if the upstream + sphinxcontrib-asyncio version requirement changes and we do not silently + switch back to sphinxcontrib-asyncio from sphinxcontrib-trio - Stop removing bundled egg-info, since this should not be required with pyproject-rpm-macros