This is based on a suggestion from Ian Stakenvicius.
---
gx86/eclass/python-r1.eclass | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
index 957db68..487b5e0 100644
--- a/gx86/eclass/python-r1.eclass
+++ b/gx86/eclass/python-r1.eclass
@@ -56,11 +56,25 @@ _PYTHON_ALL_IMPLS=(
# DEPEND="${RDEPEND}"
# @CODE
+# @ECLASS-VARIABLE: PYTHON_USEDEP
+# @DESCRIPTION:
+# This is an eclass-generated USE-dependency string which can be used to
+# depend on another Python package being built for the same Python
+# implementations. It should be used like:
+#
+# @CODE
+# RDEPEND="dev-python/foo[${PYTHON_USEDEP}]"
+# @CODE
+
PYTHON_COMPAT=( ${PYTHON_COMPAT[@]} )
_python_set_globals() {
- IUSE=${PYTHON_COMPAT[@]/#/python_targets_}
- REQUIRED_USE="|| ( ${IUSE} )"
+ local flags=( "${PYTHON_COMPAT[@]/#/python_targets_}" )
+ local optflags=${flags[@]/%/?}
+
+ IUSE=${flags}
+ REQUIRED_USE="|| ( ${flags} )"
+ PYTHON_USEDEP=${optflags// /,}
PYTHON_DEPS=
local i
--
1.7.12