A milder warning will be printed. -- Arfrever Frehtes Taifersar Arahesis
--- python.eclass
+++ python.eclass
@@ -355,6 +355,8 @@
# Check if phase is pkg_setup().
[[ "${EBUILD_PHASE}" != "setup" ]] && die "${FUNCNAME}() can be used only in pkg_setup() phase"
+ local locale
+
if [[ "$#" -ne 0 ]]; then
die "${FUNCNAME}() does not accept arguments"
fi
@@ -407,6 +409,15 @@
unset -f python_pkg_setup_check_USE_flags
fi
+ if [[ "$(locale charmap)" != "UTF-8" ]]; then
+ locale="$(python -c 'import os; print(os.environ.get("LC_ALL", os.environ.get("LC_CTYPE", os.environ.get("LANG", "POSIX"))))')"
+ ewarn
+ ewarn "Currently used locale '${locale}' can cause UnicodeDecodeError or UnicodeEncodeError"
+ ewarn "exceptions. It is recommended to use a UTF-8 locale to avoid problems."
+ ewarn "See http://www.gentoo.org/doc/en/utf-8.xml for information on how to change locale."
+ ewarn
+ fi
+
PYTHON_PKG_SETUP_EXECUTED="1"
}
signature.asc
Description: This is a digitally signed message part.
