From: "Andrew Ammerlaan" <andrewammerlaan@riseup.net> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] repo/proj/guru:master commit in: eclass/ Date: Tue, 7 Apr 2020 07:42:20 +0000 (UTC) [thread overview] Message-ID: <1586201747.764e4b954b8df8d9f1393fe514425c736f03aaf6.andrewammerlaan@gentoo> (raw) commit: 764e4b954b8df8d9f1393fe514425c736f03aaf6 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> AuthorDate: Mon Apr 6 19:35:11 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Mon Apr 6 19:35:47 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=764e4b95 eclass/docs: USE these handy _ECLASS variables to check if python-(any)-r1 has been inherited Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> eclass/docs.eclass | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass index e3eaaa3..2f243bd 100644 --- a/eclass/docs.eclass +++ b/eclass/docs.eclass @@ -86,18 +86,23 @@ esac # # Defaults to ${DOCDIR}/_build/html -# If PYHTON_COMPAT is not defined this is not a python -# package, if it is defined, odds are that either -# distutils-r1 or python-r1 is inherited as well -# in this case we cannot inherit python-any-r1 -# because these eclasses are incompatible. -# We also need to set 'something' to be able -# to inherit python-any-r1 at all -if [[ -z "${PYTHON_COMPAT}" ]]; then - PYTHON_COMPAT=( python3_{6,7,8} ) - inherit python-any-r1 -else - inherit python-r1 +if [[ ! ${_DOCS} ]]; then + +# For the python based DOCBUILDERS we need to inherit python-any-r1 +if [[ "${DOCBUILDER}"=="sphinx" || "${DOCBUILDER}"=="mkdocs" ]]; then + # If this is not a python package then + # this is not already set, so we need + # to set this to inherit python-any-r1 + if [[ -z "${PYTHON_COMPAT}" ]]; then + PYTHON_COMPAT=( python3_{6,7,8} ) + fi + + # Inherit python-any-r1 if neither python-any-r1 nor + # python-r1 have been inherited, because we need the + # python_gen_any_dep function + if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then + inherit python-any-r1 + fi fi # @FUNCTION: python_check_deps @@ -162,7 +167,7 @@ sphinx_compile() { local confpy=${DOCDIR}/conf.py [[ -f ${confpy} ]] || - die "${confpy} not found, distutils_enable_sphinx call wrong" + die "${confpy} not found, DOCDIR=${DOCDIR} call wrong" if [[ ${AUTODOC} == 0 ]]; then if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then @@ -213,7 +218,7 @@ mkdocs_compile() { local mkdocsyml=${DOCDIR}/mkdocs.yml [[ -f ${mkdocsyml} ]] || - die "${mkdocsyml} not found, distutils_enable_mkdocs call wrong" + die "${mkdocsyml} not found, DOCDIR=${DOCDIR} wrong" pushd "${DOCDIR}" mkdocs build -d "${OUTDIR}" || die @@ -299,8 +304,11 @@ fi # If this is a python package using distutils-r1 # then put the compile function in the specific # python function, else just put it in src_compile -if [[ -n "${DISTUTILS_USE_SETUPTOOLS}" ]]; then +if [[ ${_DISTUTILS_R1} ]]; then python_compile_all() { docs_compile; } else src_compile() { docs_compile; } fi + +_DOCS=1 +fi
WARNING: multiple messages have this Message-ID (diff)
From: "Andrew Ammerlaan" <andrewammerlaan@riseup.net> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ Date: Mon, 6 Apr 2020 19:36:46 +0000 (UTC) [thread overview] Message-ID: <1586201747.764e4b954b8df8d9f1393fe514425c736f03aaf6.andrewammerlaan@gentoo> (raw) Message-ID: <20200406193646.XSaNkiaG23RuzIqGS0_FiYfWRSbPWA0lH3JeFZGo2fY@z> (raw) commit: 764e4b954b8df8d9f1393fe514425c736f03aaf6 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> AuthorDate: Mon Apr 6 19:35:11 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Mon Apr 6 19:35:47 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=764e4b95 eclass/docs: USE these handy _ECLASS variables to check if python-(any)-r1 has been inherited Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> eclass/docs.eclass | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass index e3eaaa3..2f243bd 100644 --- a/eclass/docs.eclass +++ b/eclass/docs.eclass @@ -86,18 +86,23 @@ esac # # Defaults to ${DOCDIR}/_build/html -# If PYHTON_COMPAT is not defined this is not a python -# package, if it is defined, odds are that either -# distutils-r1 or python-r1 is inherited as well -# in this case we cannot inherit python-any-r1 -# because these eclasses are incompatible. -# We also need to set 'something' to be able -# to inherit python-any-r1 at all -if [[ -z "${PYTHON_COMPAT}" ]]; then - PYTHON_COMPAT=( python3_{6,7,8} ) - inherit python-any-r1 -else - inherit python-r1 +if [[ ! ${_DOCS} ]]; then + +# For the python based DOCBUILDERS we need to inherit python-any-r1 +if [[ "${DOCBUILDER}"=="sphinx" || "${DOCBUILDER}"=="mkdocs" ]]; then + # If this is not a python package then + # this is not already set, so we need + # to set this to inherit python-any-r1 + if [[ -z "${PYTHON_COMPAT}" ]]; then + PYTHON_COMPAT=( python3_{6,7,8} ) + fi + + # Inherit python-any-r1 if neither python-any-r1 nor + # python-r1 have been inherited, because we need the + # python_gen_any_dep function + if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then + inherit python-any-r1 + fi fi # @FUNCTION: python_check_deps @@ -162,7 +167,7 @@ sphinx_compile() { local confpy=${DOCDIR}/conf.py [[ -f ${confpy} ]] || - die "${confpy} not found, distutils_enable_sphinx call wrong" + die "${confpy} not found, DOCDIR=${DOCDIR} call wrong" if [[ ${AUTODOC} == 0 ]]; then if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then @@ -213,7 +218,7 @@ mkdocs_compile() { local mkdocsyml=${DOCDIR}/mkdocs.yml [[ -f ${mkdocsyml} ]] || - die "${mkdocsyml} not found, distutils_enable_mkdocs call wrong" + die "${mkdocsyml} not found, DOCDIR=${DOCDIR} wrong" pushd "${DOCDIR}" mkdocs build -d "${OUTDIR}" || die @@ -299,8 +304,11 @@ fi # If this is a python package using distutils-r1 # then put the compile function in the specific # python function, else just put it in src_compile -if [[ -n "${DISTUTILS_USE_SETUPTOOLS}" ]]; then +if [[ ${_DISTUTILS_R1} ]]; then python_compile_all() { docs_compile; } else src_compile() { docs_compile; } fi + +_DOCS=1 +fi
next reply other threads:[~2020-04-07 7:42 UTC|newest] Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-07 7:42 Andrew Ammerlaan [this message] 2020-04-06 19:36 ` [gentoo-commits] repo/proj/guru:dev commit in: eclass/ Andrew Ammerlaan -- strict thread matches above, loose matches on Subject: below -- 2024-10-19 0:05 [gentoo-commits] repo/proj/guru:master " David Roman 2024-07-14 17:47 [gentoo-commits] repo/proj/guru:dev " Florian Schmaus 2024-07-14 17:47 ` [gentoo-commits] repo/proj/guru:master " Florian Schmaus 2024-07-14 15:27 Haelwenn Monnier 2024-07-14 15:27 Haelwenn Monnier 2024-07-14 15:27 Haelwenn Monnier 2024-07-14 15:27 Haelwenn Monnier 2024-07-14 15:27 Haelwenn Monnier 2024-07-14 15:27 Haelwenn Monnier 2024-07-14 15:27 Haelwenn Monnier 2024-07-01 13:50 David Roman 2024-04-27 11:10 David Roman 2024-04-01 11:32 Julien Roy 2024-03-31 17:57 Julien Roy 2024-03-31 17:49 [gentoo-commits] repo/proj/guru:dev " Julien Roy 2024-03-31 17:57 ` [gentoo-commits] repo/proj/guru:master " Julien Roy 2024-02-05 11:57 David Roman 2024-02-05 11:57 David Roman 2024-02-05 11:57 David Roman 2024-02-05 11:57 David Roman 2024-01-20 22:13 David Roman 2024-01-03 15:20 David Roman 2023-10-05 14:25 Viorel Munteanu 2023-10-05 6:18 Viorel Munteanu 2023-08-30 5:30 [gentoo-commits] repo/proj/guru:dev " Viorel Munteanu 2023-08-30 5:36 ` [gentoo-commits] repo/proj/guru:master " Viorel Munteanu 2023-08-07 12:51 David Roman 2023-08-07 12:51 David Roman 2023-08-04 7:26 [gentoo-commits] repo/proj/guru:dev " Florian Schmaus 2023-08-04 7:26 ` [gentoo-commits] repo/proj/guru:master " Florian Schmaus 2023-08-04 7:26 [gentoo-commits] repo/proj/guru:dev " Florian Schmaus 2023-08-04 7:26 ` [gentoo-commits] repo/proj/guru:master " Florian Schmaus 2023-07-17 14:24 Florian Schmaus 2023-06-26 11:24 Andrew Ammerlaan 2023-05-22 5:17 Viorel Munteanu 2023-05-22 5:17 Viorel Munteanu 2023-05-11 14:32 Andrew Ammerlaan 2023-05-11 14:32 Andrew Ammerlaan 2023-05-11 14:32 Andrew Ammerlaan 2023-05-11 14:32 Andrew Ammerlaan 2023-05-11 14:32 Andrew Ammerlaan 2023-04-13 7:02 Florian Schmaus 2023-04-01 21:30 Haelwenn Monnier 2023-04-01 21:30 Haelwenn Monnier 2023-04-01 21:30 Haelwenn Monnier 2023-02-27 15:06 Florian Schmaus 2023-02-27 15:06 Florian Schmaus 2023-01-08 10:27 Florian Schmaus 2022-12-09 16:26 Ronny Gutbrod 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-26 10:54 Florian Schmaus 2022-11-16 19:33 Florian Schmaus 2022-11-16 19:33 Florian Schmaus 2022-11-16 19:33 Florian Schmaus 2022-11-05 15:26 Arthur Zamarin 2022-07-20 9:35 Andrew Ammerlaan 2022-07-20 9:35 Andrew Ammerlaan 2022-07-20 9:35 Andrew Ammerlaan 2022-07-20 9:35 Andrew Ammerlaan 2022-07-20 9:35 Andrew Ammerlaan 2022-07-11 6:54 Andrew Ammerlaan 2022-06-30 17:39 Florian Schmaus 2022-06-29 15:38 Florian Schmaus 2022-06-29 15:38 Florian Schmaus 2022-06-14 18:35 Haelwenn Monnier 2022-06-14 18:35 Haelwenn Monnier 2022-06-14 18:35 Haelwenn Monnier 2022-05-12 9:14 Andrew Ammerlaan 2022-05-05 14:42 Haelwenn Monnier 2022-05-05 14:42 Haelwenn Monnier 2022-05-05 14:42 Haelwenn Monnier 2022-04-15 20:58 Haelwenn Monnier 2022-04-15 20:58 Haelwenn Monnier 2022-04-14 13:31 Andrew Ammerlaan 2022-04-12 19:35 Ronny Gutbrod 2022-04-12 19:35 Ronny Gutbrod 2022-04-12 19:35 Ronny Gutbrod 2022-02-20 8:46 Florian Schmaus 2022-02-20 8:46 Florian Schmaus 2021-10-06 1:13 Theo Anderson 2021-09-30 19:39 Arthur Zamarin 2021-09-08 15:20 Arthur Zamarin 2021-07-26 14:05 Andrew Ammerlaan 2021-06-02 16:00 Andrew Ammerlaan 2021-05-24 22:25 Haelwenn Monnier 2021-05-17 19:11 Andrew Ammerlaan 2021-03-16 10:49 Andrew Ammerlaan 2021-03-15 10:58 Andrew Ammerlaan 2021-03-15 10:58 Andrew Ammerlaan 2020-12-06 10:46 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-12-06 10:49 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-05-07 11:13 Andrew Ammerlaan 2020-05-07 11:13 Andrew Ammerlaan 2020-05-01 15:39 Andrew Ammerlaan 2020-04-28 8:01 Andrew Ammerlaan 2020-04-28 7:44 Andrew Ammerlaan 2020-04-21 10:23 Andrew Ammerlaan 2020-04-21 10:20 Andrew Ammerlaan 2020-04-07 7:42 Andrew Ammerlaan 2020-04-07 7:27 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-07 7:42 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-07 7:16 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-07 7:42 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-06 18:26 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-07 7:42 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1586201747.764e4b954b8df8d9f1393fe514425c736f03aaf6.andrewammerlaan@gentoo \ --to=andrewammerlaan@riseup.net \ --cc=gentoo-commits@lists.gentoo.org \ --cc=gentoo-dev@lists.gentoo.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox