summaryrefslogtreecommitdiffstats
path: root/pym/portage/process.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-12-01 19:24:10 -0800
committerZac Medico <zmedico@gentoo.org>2011-12-01 19:24:10 -0800
commitcaea9ee807eba03118564030a166f9856d4439de (patch)
treedec771ef00041a56bf1ed5738c3aea17a7b887af /pym/portage/process.py
parent6b9a29652474f1139dc088322cf68f22f37e5fed (diff)
downloadportage-caea9ee807eba03118564030a166f9856d4439de.tar.gz
portage-caea9ee807eba03118564030a166f9856d4439de.tar.bz2
portage-caea9ee807eba03118564030a166f9856d4439de.zip
process._exec: tweak opt_name for PyPy
PyPy 1.7 will die due to "libary path not found" if argv[0] does not contain the full path of the binary.
Diffstat (limited to 'pym/portage/process.py')
-rw-r--r--pym/portage/process.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index 3c1537074..1ee5b9ae6 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -343,7 +343,12 @@ def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask,
# If the process we're creating hasn't been given a name
# assign it the name of the executable.
if not opt_name:
- opt_name = os.path.basename(binary)
+ if binary is portage._python_interpreter:
+ # NOTE: PyPy 1.7 will die due to "libary path not found" if argv[0]
+ # does not contain the full path of the binary.
+ opt_name = binary
+ else:
+ opt_name = os.path.basename(binary)
# Set up the command's argument list.
myargs = [opt_name]