--- python.eclass +++ python.eclass @@ -185,33 +185,18 @@ DEPEND=">=app-admin/eselect-python-20091230" RDEPEND="${DEPEND}" -if [[ -n "${PYTHON_DEPEND}" && -n "${NEED_PYTHON}" ]]; then - die "PYTHON_DEPEND and NEED_PYTHON cannot be set simultaneously" -elif [[ -n "${PYTHON_DEPEND}" ]]; then +if [[ -n "${PYTHON_DEPEND}" ]]; then _python_parse_PYTHON_DEPEND -elif [[ -n "${NEED_PYTHON}" ]]; then - if ! has "${EAPI:-0}" 0 1 2; then - eerror "Use PYTHON_DEPEND variable instead of NEED_PYTHON variable." - die "NEED_PYTHON variable cannot be used in this EAPI" - fi - - ewarn - ewarn "\"${EBUILD}\":" - ewarn "Deprecation Warning: NEED_PYTHON variable is deprecated and will be banned on 2010-10-01." - ewarn "Use PYTHON_DEPEND variable instead of NEED_PYTHON variable." - ewarn "The ebuild needs to be fixed. Please report a bug, if it has not been already reported." - ewarn - - unset _BOLD _NORMAL - - _PYTHON_ATOMS=(">=dev-lang/python-${NEED_PYTHON}") - DEPEND+="${DEPEND:+ }${_PYTHON_ATOMS[@]}" - RDEPEND+="${RDEPEND:+ }${_PYTHON_ATOMS[@]}" else _PYTHON_ATOMS=("dev-lang/python") fi unset -f _python_parse_PYTHON_DEPEND +if [[ -n "${NEED_PYTHON}" ]]; then + eerror "Use PYTHON_DEPEND variable instead of NEED_PYTHON variable." + die "NEED_PYTHON variable is banned" +fi + # @ECLASS-VARIABLE: PYTHON_USE_WITH # @DESCRIPTION: # Set this to a space separated list of USE flags the Python slot in use must be built with.