# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1406 2014/11/07 16:17:46 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1407 2014/11/07 18:11:58 axs Exp $
+
+ 07 Nov 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org>
+ python-single-r1.eclass:
+ Help PMs figure out what to do by turning off unimplemented
+ python_single_target_* flags in PYTHON_USEDEP; thanks to mgorny, floppym and
+ Arfever for reviews
07 Nov 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org>
python-single-r1.eclass:
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.28 2014/11/07 16:17:46 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.29 2014/11/07 18:11:58 axs Exp $
# @ECLASS: python-single-r1
# @MAINTAINER:
_python_single_set_globals() {
local impls=()
+ local unimpls=()
PYTHON_DEPS=
local i PYTHON_PKG_DEP
- for i in "${PYTHON_COMPAT[@]}"; do
- _python_impl_supported "${i}" || continue
- impls+=( "${i}" )
+ for i in "${_PYTHON_ALL_IMPLS[@]}"; do
+ has "${i}" "${PYTHON_COMPAT[@]}" \
+ && impls+=( "${i}" ) \
+ || unimpls+=( "${i}" )
done
if [[ ${#impls[@]} -eq 0 ]]; then
local flags_mt=( "${impls[@]/#/python_targets_}" )
local flags=( "${impls[@]/#/python_single_target_}" )
+ local unflags=( "${unimpls[@]/#/-python_single_target_}" )
- local optflags=${flags_mt[@]/%/(-)?}
+ local optflags=${flags_mt[@]/%/(-)?},${unflags[@]/%/(-)}
IUSE="${flags_mt[*]}"
PYTHON_REQUIRED_USE="^^ ( ${flags[*]} )"
# Ensure deps honor the same python_single_target_* flag as is set
# on this package.
- optflags+=,${flags[@]/%/(+)?}
+ optflags+=,${flags[@]/%/(+)?}
for i in "${impls[@]}"; do
# The chosen targets need to be in PYTHON_TARGETS as well.