diff options
author | 2013-01-04 01:26:22 +0000 | |
---|---|---|
committer | 2013-01-04 01:26:22 +0000 | |
commit | c049f3ac0848be742fd49fb70aa9fff735aba4e3 (patch) | |
tree | 557546c714a2cda8f554e9ddf0563be33562e083 /eclass/python-r1.eclass | |
parent | Initial import, ebuild by me. (diff) | |
download | historical-c049f3ac0848be742fd49fb70aa9fff735aba4e3.tar.gz historical-c049f3ac0848be742fd49fb70aa9fff735aba4e3.tar.bz2 historical-c049f3ac0848be742fd49fb70aa9fff735aba4e3.zip |
Don't tell the user to set USE_PYTHON when a package does not support python2.7 or python3.2.
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r-- | eclass/python-r1.eclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index cc6d8436f1cc..dd0c5bc511b0 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.34 2013/01/02 21:12:44 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.35 2013/01/04 01:26:22 floppym Exp $ # @ECLASS: python-r1 # @MAINTAINER: @@ -382,6 +382,10 @@ _python_check_USE_PYTHON() { # is installed. if [[ ! ${py2+1} && ${dis_py2} ]]; then debug-print "${FUNCNAME}: -> all py2 versions disabled" + if ! has python2_7 "${PYTHON_COMPAT[@]}"; then + debug-print "${FUNCNAME}: ---> package does not support 2.7" + return 0 + fi if has_version '=dev-lang/python-2*'; then debug-print "${FUNCNAME}: ---> but =python-2* installed!" return 1 @@ -389,6 +393,10 @@ _python_check_USE_PYTHON() { fi if [[ ! ${py3+1} && ${dis_py3} ]]; then debug-print "${FUNCNAME}: -> all py3 versions disabled" + if ! has python3_2 "${PYTHON_COMPAT[@]}"; then + debug-print "${FUNCNAME}: ---> package does not support 3.2" + return 0 + fi if has_version '=dev-lang/python-3*'; then debug-print "${FUNCNAME}: ---> but =python-3* installed!" return 1 |