commit:     07fe9f9199b537d80ce6b19d9baa6fce33843798
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 14 17:15:50 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 17:16:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07fe9f91

dev-python/sphinx-gallery: fixup nose dep

Remove setup_requires=['nose'] from setup.py.

Package-Manager: Portage-2.3.3_p32, Repoman-2.3.1_p25

 dev-python/sphinx-gallery/sphinx-gallery-0.1.7-r1.ebuild | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dev-python/sphinx-gallery/sphinx-gallery-0.1.7-r1.ebuild 
b/dev-python/sphinx-gallery/sphinx-gallery-0.1.7-r1.ebuild
index 7f9ae30..dbc19a4 100644
--- a/dev-python/sphinx-gallery/sphinx-gallery-0.1.7-r1.ebuild
+++ b/dev-python/sphinx-gallery/sphinx-gallery-0.1.7-r1.ebuild
@@ -15,7 +15,8 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
+IUSE="test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
        dev-python/matplotlib[${PYTHON_USEDEP}]
@@ -24,10 +25,16 @@ RDEPEND="
 "
 # yes nose is somehow required besides testing
 DEPEND="
-       dev-python/nose[${PYTHON_USEDEP}]
        dev-python/setuptools[${PYTHON_USEDEP}]
+       test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )
 "
 
+python_prepare_all() {
+       # Remove setup_requires=['nose']
+       sed -i -e /setup_requires/d setup.py || die
+       distutils-r1_python_prepare_all
+}
+
 python_test() {
        echo 'backend: agg' > matplotlibrc
        VARTEXFONTS="${T}"/fonts MPLCONFIGDIR="${BUILD_DIR}" \

Reply via email to