sys-apps/portage: replace epydoc with sphinx-apidoc
authorZac Medico <zmedico@gentoo.org>
Mon, 3 Feb 2020 06:27:03 +0000 (22:27 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 3 Feb 2020 09:38:11 +0000 (01:38 -0800)
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Zac Medico <zmedico@gentoo.org>
sys-apps/portage/metadata.xml
sys-apps/portage/portage-9999.ebuild

index 5d99599f67803f365839e3413768ae51d4631ea9..bf8c5a54f96a669703f273d12203ae7922c32c56 100644 (file)
@@ -10,7 +10,8 @@
     <email>dev-portage@gentoo.org</email>
   </maintainer>
   <use>
-    <flag name="epydoc">Build html API documentation with epydoc.</flag>
+    <flag name="apidoc">Build html API documentation with sphinx-apidoc.</flag>
+    <flag name="epydoc">Build html API documentation with epydoc (deprecated).</flag>
     <flag name="gentoo-dev">Enable features required for Gentoo ebuild development.</flag>
     <flag name="ipc">Use inter-process communication between portage and
         running ebuilds.
index e157a1cc9fab016e0e0814b55db03863431f7f6d..58aa5a833ab52ceca2364da54c8d4cc32e12180a 100644 (file)
@@ -19,18 +19,18 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
 LICENSE="GPL-2"
 KEYWORDS=""
 SLOT="0"
-IUSE="build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
 
 DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
        >=app-arch/tar-1.27
        dev-lang/python-exec:2
        >=sys-apps/sed-4.0.5 sys-devel/patch
        doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
-       epydoc? (
-               $(python_gen_cond_dep '
-                       >=dev-python/epydoc-2.0[${PYTHON_USEDEP}]
-               ' 'python2*')
+       apidoc? (
+               dev-python/sphinx
+               dev-python/sphinx-epytext
        )"
+
 # Require sandbox-2.2 for bug #288863.
 # For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
 # quite slow, so it's not considered in the dependencies as an alternative to
@@ -76,8 +76,6 @@ PDEPEND="
 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
 # NOTE: FEATURES=installsources requires debugedit and rsync
 
-REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
-
 SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
 
 prefix_src_archives() {
@@ -98,10 +96,6 @@ pkg_pretend() {
        check_extra_config
 }
 
-pkg_setup() {
-       use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
-}
-
 python_prepare_all() {
        distutils-r1_python_prepare_all
 
@@ -183,7 +177,7 @@ python_prepare_all() {
 python_compile_all() {
        local targets=()
        use doc && targets+=( docbook )
-       use epydoc && targets+=( epydoc )
+       use apidoc && targets+=( apidoc )
 
        if [[ ${targets[@]} ]]; then
                esetup.py "${targets[@]}"
@@ -216,8 +210,8 @@ python_install_all() {
                install_docbook
                --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
        )
-       use epydoc && targets+=(
-               install_epydoc
+       use apidoc && targets+=(
+               install_apidoc
                --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
        )