summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-10-23 12:08:27 +0200
committerMichał Górny <mgorny@gentoo.org>2019-11-01 14:15:58 +0100
commit3a8167567e4f7f938da9c34ca0a02ea2eac8de65 (patch)
treec358c90975cb32d436a9ca6e4d1240bbe3ccc2a6 /eclass/python-utils-r1.eclass
parentsys-libs/llvm-libunwind: Switch live to monorepo (diff)
downloadgentoo-3a8167567e4f7f938da9c34ca0a02ea2eac8de65.tar.gz
gentoo-3a8167567e4f7f938da9c34ca0a02ea2eac8de65.tar.bz2
gentoo-3a8167567e4f7f938da9c34ca0a02ea2eac8de65.zip
python-utils-r1.eclass: Fix python_optimize to take all of sys.path
Make sure to append NUL to every path in sys.path, rather than using it as a separator between output entries. This fixes a bug when the last path entry was silently discarded, and the function stopped working with PyPy as a result. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index f8f51ecb694a..549dd5f2e56e 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -692,7 +692,7 @@ python_optimize() {
if [[ ${f} == /* && -d ${D%/}${f} ]]; then
set -- "${D%/}${f}" "${@}"
fi
- done < <("${PYTHON}" -c 'import sys; print("\0".join(sys.path))' || die)
+ done < <("${PYTHON}" -c 'import sys; print("".join(x + "\0" for x in sys.path))' || die)
debug-print "${FUNCNAME}: using sys.path: ${*/%/;}"
fi