mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/ipython: Stop polluting sys.path with extensions/tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user