summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-07-22 20:59:17 +0200
committerUlrich Müller <ulm@gentoo.org>2022-07-22 21:00:50 +0200
commit6637557f1b4ae76e05299a6f4cead4aed80179ba (patch)
treea01f7b181a89232ceded99ce2431ded18221712e /www-apps
parentnet-proxy/haproxy: Bump to 2.6.2 (diff)
downloadgentoo-6637557f1b4ae76e05299a6f4cead4aed80179ba.tar.gz
gentoo-6637557f1b4ae76e05299a6f4cead4aed80179ba.tar.bz2
gentoo-6637557f1b4ae76e05299a6f4cead4aed80179ba.zip
www-apps/nikola: Fix runtime error with >=dev-python/markdown-3.4
Closes: https://bugs.gentoo.org/860087 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/nikola/files/nikola-8.2.2-markdown-3.4.patch49
-rw-r--r--www-apps/nikola/nikola-8.2.2-r2.ebuild62
2 files changed, 111 insertions, 0 deletions
diff --git a/www-apps/nikola/files/nikola-8.2.2-markdown-3.4.patch b/www-apps/nikola/files/nikola-8.2.2-markdown-3.4.patch
new file mode 100644
index 000000000000..a1f54773f65c
--- /dev/null
+++ b/www-apps/nikola/files/nikola-8.2.2-markdown-3.4.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/860087
+
+Patch backported from upstream:
+
+commit 1be6e8b387bbebcc891b0afc53802cf69607cfcf
+Author: Chris Warrick <kwpolska@gmail.com>
+Date: Sun Jul 17 00:08:24 2022 +0200
+
+ Fix #3635 — fix compatibility of Markdown extensions with Markdown 3.4+
+
+--- Nikola-8.2.2/nikola/plugins/compile/markdown/mdx_gist.py
++++ Nikola-8.2.2/nikola/plugins/compile/markdown/mdx_gist.py
+@@ -76,6 +76,7 @@
+ """
+
+ import requests
++import xml.etree.ElementTree as etree
+
+ from nikola.plugin_categories import MarkdownExtension
+ from nikola.utils import get_logger
+@@ -84,11 +85,10 @@
+ from markdown.extensions import Extension
+ from markdown.inlinepatterns import Pattern
+ from markdown.util import AtomicString
+- from markdown.util import etree
+ except ImportError:
+ # No need to catch this, if you try to use this without Markdown,
+ # the markdown compiler will fail first
+- Extension = Pattern = object
++ Extension = Pattern = AtomicString = object
+
+
+ LOGGER = get_logger('compile_markdown.mdx_gist')
+--- Nikola-8.2.2/nikola/plugins/compile/markdown/mdx_podcast.py
++++ Nikola-8.2.2/nikola/plugins/compile/markdown/mdx_podcast.py
+@@ -36,11 +36,12 @@
+ <p><audio controls=""><source src="https://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3" type="audio/mpeg"></source></audio></p>
+ """
+
++import xml.etree.ElementTree as etree
++
+ from nikola.plugin_categories import MarkdownExtension
+ try:
+ from markdown.extensions import Extension
+ from markdown.inlinepatterns import Pattern
+- from markdown.util import etree
+ except ImportError:
+ # No need to catch this, if you try to use this without Markdown,
+ # the markdown compiler will fail first
diff --git a/www-apps/nikola/nikola-8.2.2-r2.ebuild b/www-apps/nikola/nikola-8.2.2-r2.ebuild
new file mode 100644
index 000000000000..25ba230bd915
--- /dev/null
+++ b/www-apps/nikola/nikola-8.2.2-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8,9,10} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1 optfeature
+
+MY_PN="Nikola"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A static website and blog generator"
+HOMEPAGE="https://getnikola.com/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT Apache-2.0 CC0-1.0 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+RESTRICT="test" # needs coveralls
+
+DEPEND=">=dev-python/docutils-0.13[${PYTHON_USEDEP}]" # needs rst2man to build manpage
+RDEPEND="${DEPEND}
+ >=dev-python/Babel-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/blinker-1.3[${PYTHON_USEDEP}]
+ >=dev-python/doit-0.32[${PYTHON_USEDEP}]
+ >=dev-python/lxml-3.3.5[${PYTHON_USEDEP}]
+ >=dev-python/mako-1.0[${PYTHON_USEDEP}]
+ >=dev-python/markdown-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/natsort-3.5.2[${PYTHON_USEDEP}]
+ >=dev-python/piexif-1.0.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-1.6[${PYTHON_USEDEP}]
+ >=dev-python/PyRSS2Gen-1.1[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.2.0[${PYTHON_USEDEP}]
+ >=dev-python/unidecode-0.04.16[${PYTHON_USEDEP}]
+ >=dev-python/yapsy-1.11.223[${PYTHON_USEDEP}]
+ dev-python/pillow[jpeg,${PYTHON_USEDEP}]
+ dev-python/cloudpickle[${PYTHON_USEDEP}]"
+
+PATCHES=( "${FILESDIR}"/${P}-markdown-3.4.patch )
+
+src_install() {
+ distutils-r1_src_install
+
+ # hackish way to remove docs that ended up in the wrong place
+ rm -r "${ED}/usr/share/doc/${PN}" || die
+
+ dodoc AUTHORS.txt CHANGES.txt README.rst docs/*.rst
+ gunzip "${ED}/usr/share/man/man1/${PN}.1.gz" || die
+}
+
+pkg_postinst() {
+ optfeature "chart generation" dev-python/pygal
+ optfeature "hyphenation support" dev-python/pyphen
+ optfeature "notebook compilation and LESS support" dev-python/ipython
+ optfeature "alternative templating engine to Mako" dev-python/jinja
+ optfeature "built-in web server support" dev-python/aiohttp
+ optfeature "monitoring file system events" dev-python/watchdog
+ optfeature "extracting metadata from web media links" dev-python/micawber
+}