dev-python/pyfits: Correctly block astropy
authorJustin Lecher <jlec@gentoo.org>
Thu, 22 Oct 2015 06:50:53 +0000 (08:50 +0200)
committerJustin Lecher <jlec@gentoo.org>
Thu, 22 Oct 2015 08:31:52 +0000 (10:31 +0200)
Add missing die

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=537250

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/pyfits/pyfits-3.3.ebuild

index 5d014f3a894a01290fdae96fecb724c456157cdb..a7e69f4a4f6c7f688bf6df166512ec36d4b09505 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
 inherit distutils-r1 eutils multilib
 
 DESCRIPTION="Provides an interface to FITS formatted files under python"
@@ -18,7 +18,7 @@ IUSE="doc test"
 
 RDEPEND="
        dev-python/numpy[${PYTHON_USEDEP}]
-       !<dev-python/astropy-0.3
+       !dev-python/astropy
        sci-libs/cfitsio:0="
 DEPEND="${RDEPEND}
        dev-python/setuptools[${PYTHON_USEDEP}]
@@ -26,7 +26,7 @@ DEPEND="${RDEPEND}
        >=dev-python/stsci-distutils-0.3[${PYTHON_USEDEP}]
        doc? (
                dev-python/matplotlib[${PYTHON_USEDEP}]
-               $(python_gen_cond_dep 'dev-python/numpydoc[${PYTHON_USEDEP}]' python2_7 'python{3_3,3_4}')
+               $(python_gen_cond_dep 'dev-python/numpydoc[${PYTHON_USEDEP}]' 'python*')
                dev-python/sphinxcontrib-programoutput[${PYTHON_USEDEP}]
                dev-python/stsci-sphinxext[${PYTHON_USEDEP}]
                 )
@@ -40,7 +40,9 @@ python_prepare_all() {
                "${S}"/setup.cfg || die
 
        # https://github.com/spacetelescope/PyFITS/issues/95
-       sed -e "s/except UserWarning, w/except UserWarning as w/" -i lib/pyfits/scripts/fitscheck.py
+       sed \
+               -e "s/except UserWarning, w/except UserWarning as w/" \
+               -i lib/pyfits/scripts/fitscheck.py || die
 
        distutils-r1_python_prepare_all
 }
@@ -51,17 +53,16 @@ python_compile_all() {
 
 python_test() {
        cd "${BUILD_DIR}"/lib* || die
-       nosetests || die
+       nosetests --verbose || die
 }
 
 python_install_all() {
-       use doc && local HTML_DOCS=( docs/build/html )
+       use doc && local HTML_DOCS=( docs/build/html/. )
+       DOCS=( FAQ.txt CHANGES.txt )
        distutils-r1_python_install_all
-       dodoc FAQ.txt CHANGES.txt
        rename_binary() {
                local binary
-               for binary in "${ED}"/usr/bin/* "${D}$(python_get_scriptdir)"/*
-               do
+               for binary in "${ED}"/usr/bin/* "${D}$(python_get_scriptdir)"/*; do
                        mv ${binary}{,-${PN}} || die "failed renaming"
                done
        }