Skip to content

Commit

Permalink
dev-python/xonsh: Fix sandbox issue
Browse files Browse the repository at this point in the history
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=589442

Package-Manager: portage-2.3.2
Signed-off-by: Justin Lecher <[email protected]>
  • Loading branch information
jlec committed Nov 13, 2016
1 parent 0f2ace0 commit 771e8a7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
16 changes: 16 additions & 0 deletions dev-python/xonsh/files/xonsh-0.4.4-destdir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
setup.py | 3 ++
1 file changed, 2 insertions(+)

diff --git a/setup.py b/setup.py
index 679f984..6de421e 100755
--- a/setup.py
+++ b/setup.py
@@ -167,6 +167,8 @@ class xinstall(install):
# install Jupyter hook
root = self.root if self.root else None
prefix = self.prefix if self.prefix else None
+ destdir = os.environ["ED"]
+ prefix = destdir + prefix
try:
install_jupyter_hook(prefix=prefix, root=root)
except Exception:
15 changes: 8 additions & 7 deletions dev-python/xonsh/xonsh-0.4.4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ DEPEND="${RDEPEND}
dev-python/nose[${PYTHON_USEDEP}]
)"

python_prepare_all() {
sed \
-e "/install_kernel_spec/s:prefix=None:prefix=u\"${ED}/usr\":g" \
-i setup.py || die

distutils-r1_python_prepare_all
}
PATCHES=(
"${FILESDIR}"/${P}-destdir.patch
)

python_test() {
nosetests --verbose || die
}

src_install() {
export "${ED}"
distutils-r1_src_install
}

pkg_postinst() {
optfeature "Jupyter kernel support" dev-python/jupyter
optfeature "Alternative to readline backend" dev-python/prompt_toolkit
Expand Down

0 comments on commit 771e8a7

Please sign in to comment.