sys-apps/pkgcore: simplify docs build/install
authorTim Harder <radhermit@gentoo.org>
Sat, 23 Jan 2016 06:52:20 +0000 (01:52 -0500)
committerTim Harder <radhermit@gentoo.org>
Sat, 23 Jan 2016 06:52:40 +0000 (01:52 -0500)
sys-apps/pkgcore/pkgcore-9999.ebuild

index 2d2c13586b119c47c676939172cee18e3a34807e..0cf49627109077f1f53b0b100ec56b4c23a3a959 100644 (file)
@@ -41,15 +41,8 @@ pkg_setup() {
 }
 
 python_compile_all() {
-       if [[ ${PV} == *9999 ]]; then
-               esetup.py build_man
-               ln -s "${BUILD_DIR}/sphinx/man" man || die
-       fi
-
-       if use doc; then
-               esetup.py build_docs
-               ln -s "${BUILD_DIR}/sphinx/html" html || die
-       fi
+       [[ ${PV} == *9999 ]] && esetup.py build_man
+       use doc && esetup.py build_docs
 }
 
 python_test() {
@@ -57,14 +50,8 @@ python_test() {
 }
 
 python_install_all() {
-       local cmds=(
-               install_man
-       )
-       use doc && cmds+=(
-               install_docs --path="${ED%/}"/usr/share/doc/${PF}/html
-       )
-
-       distutils-r1_python_install "${cmds[@]}"
+       distutils-r1_python_install install_man \
+               $(usex doc "install_docs --path="${ED%/}"/usr/share/doc/${PF}/html" "")
        distutils-r1_python_install_all
 }