Add a sanity check that ensures that PYTHONPATH does not contain any
relative paths. While at it, also explicitly warn about PYTHONPATH
being set, so we know about it in build logs.
Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 1 +
eclass/python-any-r1.eclass | 1 +
eclass/python-r1.eclass | 2 ++
eclass/python-single-r1.eclass | 1 +
eclass/python-utils-r1.eclass | 34 ++++++++++++++++++++++++++++++++++
5 files changed, 39 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 4afee3d45b1c..5d9f97474b29 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -936,6 +936,7 @@ _distutils-r1_print_package_versions() {
# distutils patches and/or quirks.
distutils-r1_python_prepare_all() {
debug-print-function ${FUNCNAME} "${@}"
+ _python_sanity_checks
_distutils-r1_check_all_phase_mismatch
if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index a21df8e89498..65fffb798003 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -272,6 +272,7 @@ python_gen_any_dep() {
# This function will call python_check_deps() if