diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2022-04-24 20:21:27 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-04-24 20:23:07 +0300 |
commit | e0577a6852cfd6d5e641d0f29d1e8a8b695c4961 (patch) | |
tree | 8fc58d8a5da4d1b7f43db353b980e77ad40927f3 /dev-python/pygments | |
parent | dev-python/python-engineio: enable doc generation (diff) | |
download | gentoo-e0577a6852cfd6d5e641d0f29d1e8a8b695c4961.tar.gz gentoo-e0577a6852cfd6d5e641d0f29d1e8a8b695c4961.tar.bz2 gentoo-e0577a6852cfd6d5e641d0f29d1e8a8b695c4961.zip |
dev-python/pygments: fix doc generation
Closes: https://bugs.gentoo.org/830364
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/pygments')
-rw-r--r-- | dev-python/pygments/files/pygments-2.11.2-fix-docs-relative.patch | 26 | ||||
-rw-r--r-- | dev-python/pygments/pygments-2.11.2.ebuild | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/dev-python/pygments/files/pygments-2.11.2-fix-docs-relative.patch b/dev-python/pygments/files/pygments-2.11.2-fix-docs-relative.patch new file mode 100644 index 000000000000..199a88d28dbb --- /dev/null +++ b/dev-python/pygments/files/pygments-2.11.2-fix-docs-relative.patch @@ -0,0 +1,26 @@ +Subject: Fix relative path for doc generation + +Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> + +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -244,7 +244,7 @@ def pg_context(app, pagename, templatename, ctx, event_arg): + ctx['languages'] = lexer_name_url + + if pagename in ('styles', 'demo'): +- with open('examples/example.py') as f: ++ with open('doc/examples/example.py') as f: + html = f.read() + lexer = pygments.lexers.get_lexer_for_filename('example.py') + min_contrasts = test_contrasts.min_contrasts() +@@ -280,7 +280,7 @@ def pg_context(app, pagename, templatename, ctx, event_arg): + def source_read(app, docname, source): + # linkify issue / PR numbers in changelog + if docname == 'docs/changelog': +- with open('../CHANGES') as f: ++ with open('CHANGES') as f: + changelog = f.read() + + idx = changelog.find('\nVersion 2.4.2\n') +-- +2.35.1 diff --git a/dev-python/pygments/pygments-2.11.2.ebuild b/dev-python/pygments/pygments-2.11.2.ebuild index c4c5e5f41005..4df58e44053c 100644 --- a/dev-python/pygments/pygments-2.11.2.ebuild +++ b/dev-python/pygments/pygments-2.11.2.ebuild @@ -27,6 +27,10 @@ BDEPEND=" virtual/ttf-fonts )" +PATCHES=( + "${FILESDIR}/${PN}-2.11.2-fix-docs-relative.patch" +) + distutils_enable_sphinx doc \ dev-python/wcag-contrast-ratio distutils_enable_tests pytest |