commit: 0b7a57be43a43bc8677a51e5542334050c4f6b6a
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 6 16:01:03 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Apr 6 16:24:47 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b7a57be
dev-python/ipython: Stop polluting sys.path with extensions/tests
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
...ython-7.21.0.ebuild => ipython-7.21.0-r1.ebuild} | 21 +++++++++------------
...ython-7.22.0.ebuild => ipython-7.22.0-r1.ebuild} | 21 +++++++++------------
2 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/dev-python/ipython/ipython-7.21.0.ebuild
b/dev-python/ipython/ipython-7.21.0-r1.ebuild
similarity index 94%
rename from dev-python/ipython/ipython-7.21.0.ebuild
rename to dev-python/ipython/ipython-7.21.0-r1.ebuild
index a6700d2b28b..c79433936c2 100644
--- a/dev-python/ipython/ipython-7.21.0.ebuild
+++ b/dev-python/ipython/ipython-7.21.0-r1.ebuild
@@ -19,7 +19,7 @@ KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 x86 ~amd64-linux
~x86-linux"
IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
RESTRICT="!test? ( test )"
-CDEPEND="
+RDEPEND="
dev-python/backcall[${PYTHON_USEDEP}]
dev-python/decorator[${PYTHON_USEDEP}]
>=dev-python/jedi-0.16[${PYTHON_USEDEP}]
@@ -32,12 +32,8 @@ CDEPEND="
matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
"
-RDEPEND="${CDEPEND}
- nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
-
BDEPEND="
test? (
- ${CDEPEND}
app-text/dvipng[truetype]
>=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
dev-python/nbformat[${PYTHON_USEDEP}]
@@ -53,6 +49,10 @@ BDEPEND="
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
)"
+distutils_enable_tests pytest
+
+RDEPEND+="
+ nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
PDEPEND="
notebook? (
dev-python/notebook[${PYTHON_USEDEP}]
@@ -79,6 +79,10 @@ python_prepare_all() {
sed -e "/^ 'sphinx.ext.intersphinx',/d" -i
docs/source/conf.py || die
fi
+ # Rename the test directory to reduce sys.path pollution
+ # https://github.com/ipython/ipython/issues/12892
+ mv IPython/extensions/{,ipython_}tests || die
+
distutils-r1_python_prepare_all
}
@@ -93,13 +97,6 @@ src_test() {
virtx distutils-r1_src_test
}
-python_test() {
- distutils_install_for_testing
- pushd "${TEST_DIR}" >/dev/null || die
- "${TEST_DIR}"/scripts/iptest || die
- popd >/dev/null || die
-}
-
python_install() {
distutils-r1_python_install
diff --git a/dev-python/ipython/ipython-7.22.0.ebuild
b/dev-python/ipython/ipython-7.22.0-r1.ebuild
similarity index 94%
rename from dev-python/ipython/ipython-7.22.0.ebuild
rename to dev-python/ipython/ipython-7.22.0-r1.ebuild
index f89ce11d047..b1078fc6020 100644
--- a/dev-python/ipython/ipython-7.22.0.ebuild
+++ b/dev-python/ipython/ipython-7.22.0-r1.ebuild
@@ -19,7 +19,7 @@ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux
~x86-linux"
IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
RESTRICT="!test? ( test )"
-CDEPEND="
+RDEPEND="
dev-python/backcall[${PYTHON_USEDEP}]
dev-python/decorator[${PYTHON_USEDEP}]
>=dev-python/jedi-0.16[${PYTHON_USEDEP}]
@@ -32,12 +32,8 @@ CDEPEND="
matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
"
-RDEPEND="${CDEPEND}
- nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
-
BDEPEND="
test? (
- ${CDEPEND}
app-text/dvipng[truetype]
>=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
dev-python/nbformat[${PYTHON_USEDEP}]
@@ -53,6 +49,10 @@ BDEPEND="
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
)"
+distutils_enable_tests pytest
+
+RDEPEND+="
+ nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
PDEPEND="
notebook? (
dev-python/notebook[${PYTHON_USEDEP}]
@@ -79,6 +79,10 @@ python_prepare_all() {
sed -e "/^ 'sphinx.ext.intersphinx',/d" -i
docs/source/conf.py || die
fi
+ # Rename the test directory to reduce sys.path pollution
+ # https://github.com/ipython/ipython/issues/12892
+ mv IPython/extensions/{,ipython_}tests || die
+
distutils-r1_python_prepare_all
}
@@ -93,13 +97,6 @@ src_test() {
virtx distutils-r1_src_test
}
-python_test() {
- distutils_install_for_testing
- pushd "${TEST_DIR}" >/dev/null || die
- "${TEST_DIR}"/scripts/iptest || die
- popd >/dev/null || die
-}
-
python_install() {
distutils-r1_python_install