FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 09-19-2012, 09:43 PM
Michał Górny
 
Default Generate PYTHON_USEDEP for use in cross-package deps.

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
 

Thread Tools




All times are GMT. The time now is 05:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org