summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-04-06 18:01:03 +0200
committerMichał Górny <mgorny@gentoo.org>2021-04-06 18:24:47 +0200
commit0b7a57be43a43bc8677a51e5542334050c4f6b6a (patch)
treea084dbff5a99ab2eac8a0d67181e8ebca52623a0 /dev-python
parentx11-libs/gtk+: Put wayland-scanner dep behind USE=wayland (diff)
downloadgentoo-0b7a57be43a43bc8677a51e5542334050c4f6b6a.tar.gz
gentoo-0b7a57be43a43bc8677a51e5542334050c4f6b6a.tar.bz2
gentoo-0b7a57be43a43bc8677a51e5542334050c4f6b6a.zip
dev-python/ipython: Stop polluting sys.path with extensions/tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/ipython/ipython-7.21.0-r1.ebuild (renamed from dev-python/ipython/ipython-7.21.0.ebuild)21
-rw-r--r--dev-python/ipython/ipython-7.22.0-r1.ebuild (renamed from dev-python/ipython/ipython-7.22.0.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
index a6700d2b28b3..c79433936c28 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
index f89ce11d047e..b1078fc60203 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