From d0bb3151c569ab6e40c84c177f43bff3c7ce4780 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 25 Aug 2023 15:54:35 +0100 Subject: gentoo auto-resync : 25:08:2023 - 15:54:35 --- eclass/Manifest.gz | Bin 38499 -> 38503 bytes eclass/docs.eclass | 28 +++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 9716f8f6d1c8..f34330c99153 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/docs.eclass b/eclass/docs.eclass index 1aa4937a6363..bd2f252eff55 100644 --- a/eclass/docs.eclass +++ b/eclass/docs.eclass @@ -269,8 +269,18 @@ sphinx_compile() { sed -i -e 's:^intersphinx_mapping:disabled_&:' \ "${DOCS_DIR}"/conf.py || die # not all packages include the Makefile in pypi tarball - sphinx-build -b html -d "${DOCS_OUTDIR}"/_build/doctrees "${DOCS_DIR}" \ - "${DOCS_OUTDIR}" || die "${FUNCNAME}: sphinx-build failed" + local command=( "${EPYTHON}" -m sphinx.cmd.build ) + if ! "${EPYTHON}" -c "import sphinx.cmd.build" 2>/dev/null; then + command=( sphinx-build ) + fi + command+=( + -b html + -d "${DOCS_OUTDIR}"/_build/doctrees + "${DOCS_DIR}" + "${DOCS_OUTDIR}" + ) + echo "${command[@]}" >&2 + "${command[@]}" || die "${FUNCNAME}: sphinx-build failed" HTML_DOCS+=( "${DOCS_OUTDIR}" ) @@ -316,9 +326,17 @@ mkdocs_compile() { [[ -f ${mkdocsyml} ]] || die "${FUNCNAME}: ${mkdocsyml} not found, DOCS_DIR=${DOCS_DIR} wrong" - pushd "${DOCS_DIR}" || die - mkdocs build -d "${DOCS_OUTDIR}" || die "${FUNCNAME}: mkdocs build failed" - popd || die + pushd "${DOCS_DIR}" >/dev/null || die + local command=( "${EPYTHON}" -m mkdocs build ) + if ! "${EPYTHON}" -c "import mkdocs" 2>/dev/null; then + command=( mkdocs build ) + fi + command+=( + -d "${DOCS_OUTDIR}" + ) + echo "${command[@]}" >&2 + "${command[@]}" || die "${FUNCNAME}: mkdocs build failed" + popd >/dev/null || die # remove generated .gz variants # mkdocs currently has no option to disable this -- cgit v1.2.3