Summary: | dev-python/recommonmark forces old dev-python/sphinx | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 0xe2.0x9a.0x9b, benjamin.reveille, conardcox, esigra, gentoo, idarktemplar, leonard, redblade7, sam, tanekliang, waebbl-gentoo |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/17498 https://bugs.gentoo.org/show_bug.cgi?id=720014 https://bugs.gentoo.org/show_bug.cgi?id=769161 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 722500 | ||
Attachments: |
Fix recommonmark tests with sphinx-3
Fix disabled tests in recommonmark Update recommonmark-0.6.0.ebuild to work with sphinx-3 |
Description
Michał Górny
2020-05-17 08:06:53 UTC
Vote for solve that. Just a note that dev-python/recommonmark-0.6.0 appears to build and install correctly with dev-python/sphinx-3.2.1. All that is needed is to patch the ebuild so it does not block dev-python/sphinx-3.2.1 (but see note below): ----- BEGIN PATCH ----- --- a/dev-python/recommonmark/recommonmark-0.6.0.ebuild +++ b/dev-python/recommonmark/recommonmark-0.6.0.ebuild @@ -19,7 +19,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x8 RDEPEND=" >=dev-python/commonmark-0.8.1[${PYTHON_USEDEP}] >=dev-python/docutils-0.14[${PYTHON_USEDEP}] - <dev-python/sphinx-3[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] " distutils_enable_tests pytest ----- END PATCH ----- NOTE: My system is not currently set up to run the tests (USE=test), so I did not check those. Apparently, failing the tests is why that restriction was added in the first place (see Gentoo bug #720014). I may try looking into that if time permits. This is especially tricky when enabling Python 3.9 support. Sphinx 2.4.4 lacks Python 3.9 support but 3.2.1 have it. This causes Portage to pull in Sphinx 3.2.1, when emerging any sphinx helper package even when specifying "=sphinx-2.2.4" on the command line. This also prevents a system update, when enabling Python 3.9. The following command has fixed it for me (discovered with a lot of try and error, portage is not good in resolving this problem): ``` emerge -a1 "=sphinx-2.4.4" sphinxcontrib-jsmath sphinxcontrib-qthelp sphinxcontrib-devhelp sphinxcontrib-serializinghtml sphinxcontrib-applehelp sphinxcontrib-htmlhelp dev-python/breathe dev-python/sphinx_rtd_theme recommonmark ``` Together with theses extra use flags: ``` =dev-python/breathe-4.14.1 -python_targets_python3_9 =dev-python/sphinx_rtd_theme-0.4.3-r1 -python_targets_python3_9 =dev-python/sphinxcontrib-applehelp-1.0.2 -python_targets_python3_9 =dev-python/sphinxcontrib-devhelp-1.0.2 -python_targets_python3_9 =dev-python/sphinxcontrib-htmlhelp-1.0.3 -python_targets_python3_9 =dev-python/sphinxcontrib-jsmath-1.0.1-r1 -python_targets_python3_9 =dev-python/sphinxcontrib-qthelp-1.0.3 -python_targets_python3_9 =dev-python/sphinxcontrib-serializinghtml-1.1.4 -python_targets_python3_9 ``` Created attachment 674560 [details, diff]
Fix recommonmark tests with sphinx-3
The conf.py files in the recommonmark tests were using a deprecated variable that no longer works with dev-python/sphinx-3.2.1. Modify the files to use one of the recommended ways of using recommonmark with sphinx.
This was tested and appears to work with dev-python/sphinx-2.4.4 and dev-python/sphinx-3.2.1.
Created attachment 674563 [details, diff]
Fix disabled tests in recommonmark
recommonmark-0.6.0.ebuild disables some of the tests in recommonmark. It appears they fail to work because newer versions of sphinx produce slightly different HTML tags than the tests expected. Modify the tests to expect this newer HTML.
This was tested and appears to work with dev-python/sphinx-2.4.4 and dev-python/sphinx-3.2.1.
Created attachment 674566 [details, diff]
Update recommonmark-0.6.0.ebuild to work with sphinx-3
An attempt to modify the recommonmark-0.6.0.ebuild to work with >=dev-python/sphinx-3.
List of the changes:
1) Change the RDEPEND atom to work with any version of dev-python/sphinx, not just <dev-python/sphinx-3.
2) Apply the patches allowing recommonmark-0.6.0 to install with FEATURES=test and with either of the currently-stable sphinx versions (dev-python/sphinx-2.4.4 and dev-python/sphinx-3.2.1).
3) Remove the code that disables certain of the tests, as they should now all work with the currently-stable sphinx versions.
I think I have gotten recommonmark-0.6.0 to work with sphinx-3, even with USE='doc test' and FEATURES=test. I have included the patches that allow it to work on my system. If I see any comments that there are still problems with this, and I have what it takes to investigate, I will try to look into it. 2 "files" patches + modified ebuild from Comments 2 to 4 worked for me Had the issues noted in this bug too, so I checked upstream and noted they just released 0.7.1 a few days ago. (In reply to Anon Emuss from comment #4) > Created attachment 674560 [details, diff] [details, diff] > Fix recommonmark tests with sphinx-3 Please get this merged upstream. (In reply to Bernd from comment #9) > Had the issues noted in this bug too, so I checked upstream and noted they > just released 0.7.1 a few days ago. The new release doesn't resolve any of the problems, so I didn't bother bumping. (In reply to Michał Górny from comment #10) > The new release doesn't resolve any of the problems, so I didn't bother > bumping. Noticed that, it still needs the two patches from Anon Enuss to work. The dev-python/sphinx-3.2.1 is stable. I hit this problem when trying to upgrade sys-devel/llvm to 11.0.0 (stable) with the USE=doc which pulled in dev-python/recommonmark which wanted to downgrade sphinx to 2.4.4. This gave me slot conflict on stable which wasn't straightforward to diagnose. I think this is causing more problems. I have run into the same thing as the previous commenters. The upstream seems to be inactive. What's the alternative here? (In reply to gentoo from comment #13) > I have run into the same thing as the previous commenters. The upstream > seems to be inactive. What's the alternative here? I guess we need to see if Anon Emuss' patches are sufficient. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c50d11118861065aabb2d61767cd89832babef2 commit 0c50d11118861065aabb2d61767cd89832babef2 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-02-06 22:33:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-02-06 22:33:32 +0000 dev-python/recommonmark: fix tests with Sphinx 3 Thanks-to: Anon Emuss <abuslbea@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 <sam@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(+) |