1 |
commit: 3a8167567e4f7f938da9c34ca0a02ea2eac8de65 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 23 10:08:27 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 1 13:15:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a816756 |
7 |
|
8 |
python-utils-r1.eclass: Fix python_optimize to take all of sys.path |
9 |
|
10 |
Make sure to append NUL to every path in sys.path, rather than using |
11 |
it as a separator between output entries. This fixes a bug when |
12 |
the last path entry was silently discarded, and the function stopped |
13 |
working with PyPy as a result. |
14 |
|
15 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
16 |
|
17 |
eclass/python-utils-r1.eclass | 2 +- |
18 |
1 file changed, 1 insertion(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
21 |
index f8f51ecb694..549dd5f2e56 100644 |
22 |
--- a/eclass/python-utils-r1.eclass |
23 |
+++ b/eclass/python-utils-r1.eclass |
24 |
@@ -692,7 +692,7 @@ python_optimize() { |
25 |
if [[ ${f} == /* && -d ${D%/}${f} ]]; then |
26 |
set -- "${D%/}${f}" "${@}" |
27 |
fi |
28 |
- done < <("${PYTHON}" -c 'import sys; print("\0".join(sys.path))' || die) |
29 |
+ done < <("${PYTHON}" -c 'import sys; print("".join(x + "\0" for x in sys.path))' || die) |
30 |
|
31 |
debug-print "${FUNCNAME}: using sys.path: ${*/%/;}" |
32 |
fi |