1 |
commit: caea9ee807eba03118564030a166f9856d4439de |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 2 03:24:10 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 2 03:24:10 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=caea9ee8 |
7 |
|
8 |
process._exec: tweak opt_name for PyPy |
9 |
|
10 |
PyPy 1.7 will die due to "libary path not found" if argv[0] does not |
11 |
contain the full path of the binary. |
12 |
|
13 |
--- |
14 |
pym/portage/process.py | 7 ++++++- |
15 |
1 files changed, 6 insertions(+), 1 deletions(-) |
16 |
|
17 |
diff --git a/pym/portage/process.py b/pym/portage/process.py |
18 |
index 3c15370..1ee5b9a 100644 |
19 |
--- a/pym/portage/process.py |
20 |
+++ b/pym/portage/process.py |
21 |
@@ -343,7 +343,12 @@ def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask, |
22 |
# If the process we're creating hasn't been given a name |
23 |
# assign it the name of the executable. |
24 |
if not opt_name: |
25 |
- opt_name = os.path.basename(binary) |
26 |
+ if binary is portage._python_interpreter: |
27 |
+ # NOTE: PyPy 1.7 will die due to "libary path not found" if argv[0] |
28 |
+ # does not contain the full path of the binary. |
29 |
+ opt_name = binary |
30 |
+ else: |
31 |
+ opt_name = os.path.basename(binary) |
32 |
|
33 |
# Set up the command's argument list. |
34 |
myargs = [opt_name] |