commit: e8057f03b9638b28d1dce06cc4d9b1a39d8ea4e7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 16 16:39:31 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 16 17:11:38 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8057f03
python-single-r1.eclass: Document new pattern support
eclass/python-single-r1.eclass | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 42c696c1f9a..3762d3d6e99 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -271,8 +271,11 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
# are both in PYTHON_COMPAT and match any of the patterns passed
# as parameters to the function.
#
-# Remember to escape or quote the patterns to prevent shell filename
-# expansion.
+# The patterns can be either fnmatch-style patterns (matched via bash
+# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate
+# appropriately all enabled Python 2/3 implementations (alike
+# python_is_python3). Remember to escape or quote the fnmatch patterns
+# to prevent accidental shell filename expansion.
#
# When all implementations are requested, please use ${PYTHON_USEDEP}
# instead. Please also remember to set an appropriate REQUIRED_USE
@@ -315,6 +318,12 @@ python_gen_usedep() {
# are both in PYTHON_COMPAT and match any of the patterns passed
# as parameters to the function.
#
+# The patterns can be either fnmatch-style patterns (matched via bash
+# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate
+# appropriately all enabled Python 2/3 implementations (alike
+# python_is_python3). Remember to escape or quote the fnmatch patterns
+# to prevent accidental shell filename expansion.
+#
# Example:
# @CODE
# PYTHON_COMPAT=( python{2_7,3_4} )
@@ -352,6 +361,12 @@ python_gen_useflags() {
# of Python implementations which are both in PYTHON_COMPAT and match
# any of the patterns passed as the remaining parameters.
#
+# The patterns can be either fnmatch-style patterns (matched via bash
+# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate
+# appropriately all enabled Python 2/3 implementations (alike
+# python_is_python3). Remember to escape or quote the fnmatch patterns
+# to prevent accidental shell filename expansion.
+#
# In order to enforce USE constraints on the packages, verbatim
# '${PYTHON_USEDEP}' (quoted!) may be placed in the dependency
# specification. It will get expanded within the function into a proper
@@ -411,6 +426,12 @@ python_gen_cond_dep() {
# patterns are passed, the output dependencies will be generated only
# for the implementations matching them.
#
+# The patterns can be either fnmatch-style patterns (matched via bash
+# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate
+# appropriately all enabled Python 2/3 implementations (alike
+# python_is_python3). Remember to escape or quote the fnmatch patterns
+# to prevent accidental shell filename expansion.
+#
# Use this function when you need to request different USE flags
# on the Python interpreter depending on package's USE flags. If you
# only need a single set of interpreter USE flags, just set