From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4AB5C13835A for ; Sat, 6 Feb 2021 22:34:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85AF8E0870; Sat, 6 Feb 2021 22:34:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 60DA3E0870 for ; Sat, 6 Feb 2021 22:34:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5A5AF34365B for ; Sat, 6 Feb 2021 22:34:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2B4884C5 for ; Sat, 6 Feb 2021 22:34:08 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1612650812.0c50d11118861065aabb2d61767cd89832babef2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/recommonmark/files/, dev-python/recommonmark/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-1.patch dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-2.patch dev-python/recommonmark/recommonmark-0.6.0-r1.ebuild X-VCS-Directories: dev-python/recommonmark/files/ dev-python/recommonmark/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0c50d11118861065aabb2d61767cd89832babef2 X-VCS-Branch: master Date: Sat, 6 Feb 2021 22:34:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 96eb3ca7-9f1f-47d5-ae3a-5da472bf4e26 X-Archives-Hash: e58fc49628eddf4dd62248a779f80630 commit: 0c50d11118861065aabb2d61767cd89832babef2 Author: Sam James gentoo org> AuthorDate: Sat Feb 6 22:33:21 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sat Feb 6 22:33:32 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c50d111 dev-python/recommonmark: fix tests with Sphinx 3 Thanks-to: Anon Emuss centurylink.net> Bug: https://bugs.gentoo.org/769140 Bug: https://bugs.gentoo.org/720014 Closes: https://bugs.gentoo.org/723468 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sam James gentoo.org> .../files/recommonmark-0.6.0-sphinx3-1.patch | 122 +++++++++++++++++++++ .../files/recommonmark-0.6.0-sphinx3-2.patch | 63 +++++++++++ .../recommonmark/recommonmark-0.6.0-r1.ebuild | 30 +++++ 3 files changed, 215 insertions(+) diff --git a/dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-1.patch b/dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-1.patch new file mode 100644 index 00000000000..f628630c200 --- /dev/null +++ b/dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-1.patch @@ -0,0 +1,122 @@ +https://bugs.gentoo.org/723468#c4 +By Anon Emuss +---- +Update tests for sphinx-3 + +The deprecated source_parsers no longer works with sphinx-3. Modify +conf.py files to use the recommonmark extension, which sphinx supports. + +Tested and appears to work with sphinx-2.4.4 and sphinx-3.2.1. + +diff --git a/tests/sphinx_code_block/conf.py b/tests/sphinx_code_block/conf.py +index 6b0140e..ddfafd5 100644 +--- a/tests/sphinx_code_block/conf.py ++++ b/tests/sphinx_code_block/conf.py +@@ -1,11 +1,9 @@ + + # -*- coding: utf-8 -*- + +-from recommonmark.parser import CommonMarkParser +- + templates_path = ['_templates'] +-source_suffix = '.md' +-source_parsers = { '.md': CommonMarkParser } ++extensions = ['recommonmark'] ++source_suffix = { '.md': 'markdown' } + master_doc = 'index' + project = u'sphinxproj' + copyright = u'2015, rtfd' +diff --git a/tests/sphinx_custom_md/conf.py b/tests/sphinx_custom_md/conf.py +index b29157b..9073346 100644 +--- a/tests/sphinx_custom_md/conf.py ++++ b/tests/sphinx_custom_md/conf.py +@@ -1,12 +1,11 @@ + + # -*- coding: utf-8 -*- + +-from recommonmark.parser import CommonMarkParser + from recommonmark.transform import AutoStructify + + templates_path = ['_templates'] +-source_suffix = '.markdown' +-source_parsers = { '.markdown': CommonMarkParser } ++extensions = ['recommonmark'] ++source_suffix = { '.markdown': 'markdown' } + master_doc = 'index' + project = u'sphinxproj' + copyright = u'2015, rtfd' +diff --git a/tests/sphinx_generic/conf.py b/tests/sphinx_generic/conf.py +index 6b0140e..ddfafd5 100644 +--- a/tests/sphinx_generic/conf.py ++++ b/tests/sphinx_generic/conf.py +@@ -1,11 +1,9 @@ + + # -*- coding: utf-8 -*- + +-from recommonmark.parser import CommonMarkParser +- + templates_path = ['_templates'] +-source_suffix = '.md' +-source_parsers = { '.md': CommonMarkParser } ++extensions = ['recommonmark'] ++source_suffix = { '.md': 'markdown' } + master_doc = 'index' + project = u'sphinxproj' + copyright = u'2015, rtfd' +diff --git a/tests/sphinx_indented_code/conf.py b/tests/sphinx_indented_code/conf.py +index f441071..90c5692 100644 +--- a/tests/sphinx_indented_code/conf.py ++++ b/tests/sphinx_indented_code/conf.py +@@ -1,11 +1,9 @@ + + # -*- coding: utf-8 -*- + +-from recommonmark.parser import CommonMarkParser +- + templates_path = ['_templates'] +-source_suffix = '.md' +-source_parsers = { '.md': CommonMarkParser } ++extensions = ['recommonmark'] ++source_suffix = { '.md': 'markdown' } + master_doc = 'index' + project = u'sphinxproj' + copyright = u'2015, rtfd' +diff --git a/tests/sphinx_nested_header_block/conf.py b/tests/sphinx_nested_header_block/conf.py +index 6b0140e..ddfafd5 100644 +--- a/tests/sphinx_nested_header_block/conf.py ++++ b/tests/sphinx_nested_header_block/conf.py +@@ -1,11 +1,9 @@ + + # -*- coding: utf-8 -*- + +-from recommonmark.parser import CommonMarkParser +- + templates_path = ['_templates'] +-source_suffix = '.md' +-source_parsers = { '.md': CommonMarkParser } ++extensions = ['recommonmark'] ++source_suffix = { '.md': 'markdown' } + master_doc = 'index' + project = u'sphinxproj' + copyright = u'2015, rtfd' +diff --git a/tests/sphinx_xref/conf.py b/tests/sphinx_xref/conf.py +index 443a026..acd840b 100644 +--- a/tests/sphinx_xref/conf.py ++++ b/tests/sphinx_xref/conf.py +@@ -1,14 +1,11 @@ + + # -*- coding: utf-8 -*- + +-from recommonmark.parser import CommonMarkParser +- +-extensions = 'sphinx.ext.autosectionlabel'] ++extensions = ['sphinx.ext.autosectionlabel', 'recommonmark'] + autosectionlabel_prefix_document = True + + templates_path = ['_templates'] +-source_suffix = '.md' +-source_parsers = { '.md': CommonMarkParser } ++source_suffix = { '.md': 'markdown' } + master_doc = 'index' + project = u'sphinxproj' + copyright = u'2015, rtfd' diff --git a/dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-2.patch b/dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-2.patch new file mode 100644 index 00000000000..75d9b1c961c --- /dev/null +++ b/dev-python/recommonmark/files/recommonmark-0.6.0-sphinx3-2.patch @@ -0,0 +1,63 @@ +https://bugs.gentoo.org/723468#c5 +By Anon Emuss +---- +Fix minor HTML changes in tests + +Newer versions of sphinx now put

tags around various elements. +Update the test_lists and CustomExtensionTests tests to expect that. +Also do not expect a class="first" for the Contents in the +CustomExtensionTests. + +Tested and appears to work with sphinx-2.4.4 and sphinx-3.2.1. + +diff --git a/tests/test_sphinx.py b/tests/test_sphinx.py +index 06078b1..8f4acb2 100644 +--- a/tests/test_sphinx.py ++++ b/tests/test_sphinx.py +@@ -142,17 +142,17 @@ class GenericTests(SphinxIntegrationTests): + output = self.read_file('index.html') + self.assertIn( + ('

    \n' +- '
  • Item A
  • \n' +- '
  • Item B
  • \n' +- '
  • Item C
  • \n' ++ '
  • Item A

  • \n' ++ '
  • Item B

  • \n' ++ '
  • Item C

  • \n' + '
'), + output + ) + self.assertIn( + ('
    \n' +- '
  1. Item 1
  2. \n' +- '
  3. Item 2
  4. \n' +- '
  5. Item 3
  6. \n' ++ '
  7. Item 1

  8. \n' ++ '
  9. Item 2

  10. \n' ++ '
  11. Item 3

  12. \n' + '
'), + output + ) +@@ -207,16 +207,17 @@ class CustomExtensionTests(SphinxIntegrationTests): + def test_integration(self): + output = self.read_file('index.html') + self.assertIn('abc', output) +- self.assertIn('', output) ++ self.assertIn('', output) ++ self.assertIn('', output) + self.assertIn('
data

abc

data

', output) + + self.assertIn( + ('
\n' +- '

Contents

\n' ++ '

Contents

\n' + '
    \n' +- '
  • Header'), + output + ) diff --git a/dev-python/recommonmark/recommonmark-0.6.0-r1.ebuild b/dev-python/recommonmark/recommonmark-0.6.0-r1.ebuild new file mode 100644 index 00000000000..e9b2fe6b79c --- /dev/null +++ b/dev-python/recommonmark/recommonmark-0.6.0-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit distutils-r1 + +DESCRIPTION="Python docutils-compatibility bridge to CommonMark" +HOMEPAGE="https://recommonmark.readthedocs.io/" +SRC_URI="https://github.com/rtfd/recommonmark/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + >=dev-python/commonmark-0.8.1[${PYTHON_USEDEP}] + >=dev-python/docutils-0.14[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${PN}-0.6.0-sphinx3-1.patch" + "${FILESDIR}/${PN}-0.6.0-sphinx3-2.patch" +) + +distutils_enable_tests pytest