diff options
author | Julian Ospald <hasufell@gentoo.org> | 2012-09-26 12:07:45 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2012-09-26 12:07:45 +0000 |
commit | b5f7e47dfa2e6666bf740ccaeef41fb6324cb1d1 (patch) | |
tree | 908cdf3e093ecd404b89b71d572e47b8547bade7 /eclass/python-distutils-ng.eclass | |
parent | Version bump. (diff) | |
download | gentoo-2-b5f7e47dfa2e6666bf740ccaeef41fb6324cb1d1.tar.gz gentoo-2-b5f7e47dfa2e6666bf740ccaeef41fb6324cb1d1.tar.bz2 gentoo-2-b5f7e47dfa2e6666bf740ccaeef41fb6324cb1d1.zip |
add PYTHON_USE wrt #426768
Diffstat (limited to 'eclass/python-distutils-ng.eclass')
-rw-r--r-- | eclass/python-distutils-ng.eclass | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/eclass/python-distutils-ng.eclass b/eclass/python-distutils-ng.eclass index 4aecc3ce12dc..f3ab7b0177af 100644 --- a/eclass/python-distutils-ng.eclass +++ b/eclass/python-distutils-ng.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v 1.26 2012/06/10 14:23:43 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v 1.27 2012/09/26 12:07:45 hasufell Exp $ # @ECLASS: python-distutils-ng # @MAINTAINER: @@ -59,6 +59,18 @@ fi # Set to any value to disable automatic reinstallation of scripts in bin # directories. See python-distutils-ng_src_install function. +# @ECLASS-VARIABLE: PYTHON_USE +# @DEFAULT_UNSET +# @DESCRIPTION: +# Comma-separated list of useflags needed for all(!) allowed +# implementations. This is directly substituted into one or more of +# dev-lang/python[${PYTHON_USE}], dev-python/pypy[${PYTHON_USE}] and +# dev-java/jython[${PYTHON_USE}]. +# @CODE +# example 1: PYTHON_USE="xml,sqlite" +# example 2: PYTHON_USE="xml?,threads?,-foo" +# @CODE + EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install case "${EAPI}" in @@ -107,16 +119,20 @@ else fi unset required_use_str +# avoid empty use deps +_PYTHON_USE="${PYTHON_USE:+[${PYTHON_USE}]}" + +# set python DEPEND and RDEPEND for impl in ${PYTHON_COMPAT}; do IUSE+=" python_targets_${impl}" dep_str="${impl/_/.}" case "${dep_str}" in python?.?) - dep_str="dev-lang/python:${dep_str: -3}" ;; + dep_str="dev-lang/python:${dep_str: -3}${_PYTHON_USE}" ;; jython?.?) - dep_str="dev-java/jython:${dep_str: -3}" ;; + dep_str="dev-java/jython:${dep_str: -3}${_PYTHON_USE}" ;; pypy?.?) - dep_str="dev-python/pypy:${dep_str: -3}" ;; + dep_str="dev-python/pypy:${dep_str: -3}${_PYTHON_USE}" ;; *) die "Unsupported implementation: ${impl}" ;; esac |