summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2017-05-02 14:48:40 -0700
committerMichał Górny <mgorny@gentoo.org>2017-05-16 19:18:03 +0200
commitbe5d7fe2ce9ed9fa6065646b2416dc92a4830f94 (patch)
tree5f1060b3289098b679a1e0e8add4f1646390c720 /eclass
parentpython-single-r1.eclass: Document new pattern support (diff)
downloadgentoo-be5d7fe2ce9ed9fa6065646b2416dc92a4830f94.tar.gz
gentoo-be5d7fe2ce9ed9fa6065646b2416dc92a4830f94.tar.bz2
gentoo-be5d7fe2ce9ed9fa6065646b2416dc92a4830f94.zip
python-utils-r1.eclass: support PYTHON_COMPAT_NO_STRICT variable
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.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 1a9f6ed171d..c1349ff277b 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -47,6 +47,18 @@ _PYTHON_ALL_IMPLS=(
)
readonly _PYTHON_ALL_IMPLS
+# @ECLASS-VARIABLE: PYTHON_COMPAT_NO_STRICT
+# @INTERNAL
+# @DESCRIPTION:
+# Set to a non-empty value in order to make eclass tolerate (ignore)
+# unknown implementations in PYTHON_COMPAT.
+#
+# This is intended to be set by the user when using ebuilds that may
+# have unknown (newer) 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 a different
+# set of Python implementations.
+
# @FUNCTION: _python_impl_supported
# @USAGE: <impl>
# @INTERNAL
@@ -79,6 +91,7 @@ _python_impl_supported() {
fi
;;
*)
+ [[ ${PYTHON_COMPAT_NO_STRICT} ]] && return 1
die "Invalid implementation in PYTHON_COMPAT: ${impl}"
esac
}