This is intended to be set by the user when using ebuilds that may
have unknown implementations in PYTHON_COMPAT. The assumption is
that the ebuilds are intended to be used within multiple contexts
which can involve revisions of this eclass that support different
python implementations.
---
eclass/python-utils-r1.eclass | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 66a359e..1846da3 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -47,6 +47,21 @@ _PYTHON_ALL_IMPLS=(
)
readonly _PYTHON_ALL_IMPLS
+# @ECLASS-VARIABLE: PYTHON_IMPLS_NO_STRICT
+# @DESCRIPTION:
+# Tolerate unknown implementations in PYTHON_COMPAT.
+#
+# This is intended to be set by the user when using ebuilds that may
+# have unknown implementations in PYTHON_COMPAT. The assumption is
+# that the ebuilds are intended to be used within multiple contexts
+# which can involve revisions of this eclass that support different
+# python implementations.
+#
+# Example:
+# @CODE
+# PYTHON_IMPLS_NO_STRICT=1
+# @CODE
+
# @FUNCTION: _python_impl_supported
# @USAGE: <impl>
# @INTERNAL
@@ -79,6 +94,7 @@ _python_impl_supported() {
fi
;;
*)
+ [[ -n ${PYTHON_IMPLS_NO_STRICT} ]] && return 1
die "Invalid implementation in PYTHON_COMPAT: ${impl}"
esac
}
--
2.10.2