/[gentoo-x86]/eclass/python-distutils-ng.eclass
Gentoo

Diff of /eclass/python-distutils-ng.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.26 Revision 1.27
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/python-distutils-ng.eclass,v 1.26 2012/06/10 14:23:43 floppym Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/python-distutils-ng.eclass,v 1.27 2012/09/26 12:07:45 hasufell Exp $
4 4
5# @ECLASS: python-distutils-ng 5# @ECLASS: python-distutils-ng
6# @MAINTAINER: 6# @MAINTAINER:
7# Python herd <python@gentoo.org> 7# Python herd <python@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
57# @DEFAULT_UNSET 57# @DEFAULT_UNSET
58# @DESCRIPTION: 58# @DESCRIPTION:
59# Set to any value to disable automatic reinstallation of scripts in bin 59# Set to any value to disable automatic reinstallation of scripts in bin
60# directories. See python-distutils-ng_src_install function. 60# directories. See python-distutils-ng_src_install function.
61 61
62# @ECLASS-VARIABLE: PYTHON_USE
63# @DEFAULT_UNSET
64# @DESCRIPTION:
65# Comma-separated list of useflags needed for all(!) allowed
66# implementations. This is directly substituted into one or more of
67# dev-lang/python[${PYTHON_USE}], dev-python/pypy[${PYTHON_USE}] and
68# dev-java/jython[${PYTHON_USE}].
69# @CODE
70# example 1: PYTHON_USE="xml,sqlite"
71# example 2: PYTHON_USE="xml?,threads?,-foo"
72# @CODE
73
62EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install 74EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
63 75
64case "${EAPI}" in 76case "${EAPI}" in
65 0|1|2|3) 77 0|1|2|3)
66 die "Unsupported EAPI=${EAPI} (too old) for python-distutils-ng.eclass" ;; 78 die "Unsupported EAPI=${EAPI} (too old) for python-distutils-ng.eclass" ;;
105else 117else
106 REQUIRED_USE+=" ${required_use_str}" 118 REQUIRED_USE+=" ${required_use_str}"
107fi 119fi
108unset required_use_str 120unset required_use_str
109 121
122# avoid empty use deps
123_PYTHON_USE="${PYTHON_USE:+[${PYTHON_USE}]}"
124
125# set python DEPEND and RDEPEND
110for impl in ${PYTHON_COMPAT}; do 126for impl in ${PYTHON_COMPAT}; do
111 IUSE+=" python_targets_${impl}" 127 IUSE+=" python_targets_${impl}"
112 dep_str="${impl/_/.}" 128 dep_str="${impl/_/.}"
113 case "${dep_str}" in 129 case "${dep_str}" in
114 python?.?) 130 python?.?)
115 dep_str="dev-lang/python:${dep_str: -3}" ;; 131 dep_str="dev-lang/python:${dep_str: -3}${_PYTHON_USE}" ;;
116 jython?.?) 132 jython?.?)
117 dep_str="dev-java/jython:${dep_str: -3}" ;; 133 dep_str="dev-java/jython:${dep_str: -3}${_PYTHON_USE}" ;;
118 pypy?.?) 134 pypy?.?)
119 dep_str="dev-python/pypy:${dep_str: -3}" ;; 135 dep_str="dev-python/pypy:${dep_str: -3}${_PYTHON_USE}" ;;
120 *) 136 *)
121 die "Unsupported implementation: ${impl}" ;; 137 die "Unsupported implementation: ${impl}" ;;
122 esac 138 esac
123 dep_str="python_targets_${impl}? ( ${dep_str} )" 139 dep_str="python_targets_${impl}? ( ${dep_str} )"
124 140

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.20