mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user