diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-24 10:33:12 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-24 10:33:12 +0000 |
commit | 0e7b1da874d923b9f006e0000023f5fa528140a8 (patch) | |
tree | 5fe8ce29562fb30bd971efe3ae2fedc7f81fed2f /dev-python/sphinxcontrib-jquery | |
parent | 9f644c082e09048b176cdc65d87a0e6df3f18f2f (diff) |
gentoo auto-resync : 24:11:2023 - 10:33:11
Diffstat (limited to 'dev-python/sphinxcontrib-jquery')
3 files changed, 106 insertions, 1 deletions
diff --git a/dev-python/sphinxcontrib-jquery/Manifest b/dev-python/sphinxcontrib-jquery/Manifest index 12de92c75ee5..301813acf30e 100644 --- a/dev-python/sphinxcontrib-jquery/Manifest +++ b/dev-python/sphinxcontrib-jquery/Manifest @@ -1,3 +1,4 @@ +AUX sphinxcontrib-jquery-4.1-backport-pr28.patch 4229 BLAKE2B 0c46e7ebd3183f207138df9e177f0b3c287f513ea0aa1d36f1c840c8ad956016e8edd5b22dd4bf4a9531050b7200298d2631ab9b971fb387aa545f6bb676db19 SHA512 b0623e835e6aae8e5048b40813dcc7a2c703e202bff57707e9daea2822d0150173551d5d29c80873da3d4f8d5fa4a18a4f8552b6966e2276bd3dc99f68a3a9c4 DIST sphinxcontrib-jquery-4.1.tar.gz 122331 BLAKE2B 3f0ba80c20c13a6543968b0c7234fd86ba238fa723191956e6b125ae709db8a048d585815e6ddb152b3808bcc857bb43c025ffa722a18f74ab265a667c9574b7 SHA512 a686f59b973276e10bf6ece507d2c2f7ff26d46c3a4aef0884f359cb86a9b033bf0d5f1d1e22e0f7e4790dfb99be5ad7ffd8469193180b9ebe348c7ff3ed981c -EBUILD sphinxcontrib-jquery-4.1.ebuild 612 BLAKE2B b26c3ba88b3b9ee453d1b2b974da9479e0cc74696f27afe909bb5b8b76ead32171c929bedbda985ccb282b677a0f0a8ffe50e6ca52b96006ac444f77cf61af4c SHA512 770459cbae7616c4bbad38ba56dbf024b9d9d8a97852c4aa67bb2bcb38212876ef55153af3bea92d7d4888f63f27a0cfa3fea13d8d1d7efc56ded8dc83db7ba1 +EBUILD sphinxcontrib-jquery-4.1.ebuild 669 BLAKE2B 6824cbf60ee64e3f036b7279f7665d66bd8e6017ea33a488bbccbf6310167b498284dff1844aaef84c08e8c629c967786051c727c58bf9997cf4f4c96a532fba SHA512 8f55c4c630a710c25e330a582e891abbddf8d70ebae7105181577777bc43b21ae48137464c7a85119db432cfc79d013b603fa65b56cf0708eb25e708fe481ae4 MISC metadata.xml 409 BLAKE2B a1b51d7229a523798c368121b926375f38e9284e77025bd036ab759591ecd5466d4dbcf63fd9fcc52bad90641d74f7ad5268e3560925d5acabdef09132808554 SHA512 7ade38d7d2077cb76b21ade858fd68656a41288475a7cce7e6e72cf62499765ffa1de685da22b477ec327779c6787a39f6a2cca6f00959aa7ab8eee62d14b040 diff --git a/dev-python/sphinxcontrib-jquery/files/sphinxcontrib-jquery-4.1-backport-pr28.patch b/dev-python/sphinxcontrib-jquery/files/sphinxcontrib-jquery-4.1-backport-pr28.patch new file mode 100644 index 000000000000..b9b10eb793c7 --- /dev/null +++ b/dev-python/sphinxcontrib-jquery/files/sphinxcontrib-jquery-4.1-backport-pr28.patch @@ -0,0 +1,102 @@ +https://bugs.gentoo.org/911837 +https://github.com/sphinx-contrib/jquery/pull/28 + +From ac97ce5202b05ddb6bf4e5b77151a8964b6bf632 Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev <mitya57@gmail.com> +Date: Mon, 31 Jul 2023 15:22:24 +0300 +Subject: [PATCH 1/3] Make the tests pass with Sphinx 7.1 + +Fixes #25. +--- + .github/workflows/test.yml | 5 ++++- + tests/test_jquery_installed.py | 12 ++++++++---- + 2 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/tests/test_jquery_installed.py b/tests/test_jquery_installed.py +index a402bd4..08c25ba 100644 +--- a/tests/test_jquery_installed.py ++++ b/tests/test_jquery_installed.py +@@ -38,12 +38,14 @@ def test_jquery_installed_sphinx_ge_60_use_sri(blank_app): + out_dir = blank_app(confoverrides={"extensions": ["sphinxcontrib.jquery"], "jquery_use_sri": True}) + + text = out_dir.joinpath("index.html").read_text(encoding="utf-8") ++ checksum = '?v=5d32c60e' if sphinx.version_info[:2] >= (7, 1) else '' + assert ('<script ' + 'integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" ' +- 'src="_static/jquery.js"></script>') in text ++ f'src="_static/jquery.js{checksum}"></script>') in text ++ checksum = '?v=2cd50e6c' if sphinx.version_info[:2] >= (7, 1) else '' + assert ('<script ' + 'integrity="sha384-lSZeSIVKp9myfKbDQ3GkN/KHjUc+mzg17VKDN4Y2kUeBSJioB9QSM639vM9fuY//" ' +- 'src="_static/_sphinx_javascript_frameworks_compat.js"></script>') in text ++ f'src="_static/_sphinx_javascript_frameworks_compat.js{checksum}"></script>') in text + + static_dir = out_dir / '_static' + assert static_dir.joinpath('jquery.js').is_file() +@@ -56,10 +58,12 @@ def test_jquery_installed_sphinx_ge_60(blank_app): + out_dir = blank_app(confoverrides={"extensions": ["sphinxcontrib.jquery"]}) + + text = out_dir.joinpath("index.html").read_text(encoding="utf-8") ++ checksum = '?v=5d32c60e' if sphinx.version_info[:2] >= (7, 1) else '' + assert ('<script ' +- 'src="_static/jquery.js"></script>') in text ++ f'src="_static/jquery.js{checksum}"></script>') in text ++ checksum = '?v=2cd50e6c' if sphinx.version_info[:2] >= (7, 1) else '' + assert ('<script ' +- 'src="_static/_sphinx_javascript_frameworks_compat.js"></script>') in text ++ f'src="_static/_sphinx_javascript_frameworks_compat.js{checksum}"></script>') in text + + static_dir = out_dir / '_static' + assert static_dir.joinpath('jquery.js').is_file() + +From 3318a82854fccec528cd73e12ab2ab96d8e71064 Mon Sep 17 00:00:00 2001 +From: Karolina Surma <ksurma@redhat.com> +Date: Thu, 2 Nov 2023 10:44:24 +0100 +Subject: [PATCH 2/3] Enable testing with Sphinx 7.2+ + +Since Sphinx is heading towards the standard Path objects, there's +no need to monkeypatch the attributes anymore: the Path.resolve() +method does the relevant work for us. +--- + tests/test_jquery_installed.py | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/tests/test_jquery_installed.py b/tests/test_jquery_installed.py +index 08c25ba..32012e3 100644 +--- a/tests/test_jquery_installed.py ++++ b/tests/test_jquery_installed.py +@@ -4,11 +4,18 @@ + + import pytest + import sphinx +-from sphinx.testing.path import path + from sphinx.testing.util import SphinxTestApp ++from packaging.version import parse + + from sphinxcontrib.jquery import _FILES, _ROOT_DIR # NoQA + ++last_with_legacy = parse("7.1.2") ++if parse(sphinx.__version__) > last_with_legacy: ++ test_path = Path ++else: ++ from sphinx.testing.path import path ++ test_path = path ++ + + def run_blank_app(srcdir, **kwargs): + Path(srcdir, "conf.py").write_text("", encoding="ascii") +@@ -26,9 +33,11 @@ def run_blank_app(srcdir, **kwargs): + @pytest.fixture(scope="function") + def blank_app(tmpdir, monkeypatch): + def inner(**kwargs): +- return run_blank_app(path(tmpdir), **kwargs) ++ return run_blank_app(test_path(tmpdir), **kwargs) + +- monkeypatch.setattr("sphinx.application.abspath", lambda x: x) ++ # Sphinx 7.2.x doesn't have abspath ++ if hasattr(sphinx.application, "abspath"): ++ monkeypatch.setattr("sphinx.application.abspath", lambda x: x) + yield inner + + + diff --git a/dev-python/sphinxcontrib-jquery/sphinxcontrib-jquery-4.1.ebuild b/dev-python/sphinxcontrib-jquery/sphinxcontrib-jquery-4.1.ebuild index 1b08a94fffb4..6a63a04482f9 100644 --- a/dev-python/sphinxcontrib-jquery/sphinxcontrib-jquery-4.1.ebuild +++ b/dev-python/sphinxcontrib-jquery/sphinxcontrib-jquery-4.1.ebuild @@ -24,4 +24,6 @@ RDEPEND=" dev-python/sphinx[${PYTHON_USEDEP}] " +PATCHES=( "${FILESDIR}/${PN}-4.1-backport-pr28.patch" ) + distutils_enable_tests pytest |