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

Diff of /eclass/distutils.eclass

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

Revision 1.61 Revision 1.69
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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/distutils.eclass,v 1.61 2009/09/07 02:34:10 arfrever Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.69 2010/01/10 17:24:32 arfrever Exp $
4 4
5# @ECLASS: distutils.eclass 5# @ECLASS: distutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# <python@gentoo.org> 7# <python@gentoo.org>
8# 8#
22 *) 22 *)
23 EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm 23 EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm
24 ;; 24 ;;
25esac 25esac
26 26
27if [[ -z "${DISTUTILS_DISABLE_PYTHON_DEPENDENCY}" ]]; then
27DEPEND="virtual/python" 28 DEPEND="virtual/python"
28RDEPEND="${DEPEND}" 29 RDEPEND="${DEPEND}"
30fi
31
32if has "${EAPI:-0}" 0 1 2; then
29python="python" 33 python="python"
34else
35 python="die"
36fi
30 37
31# @ECLASS-VARIABLE: DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES 38# @ECLASS-VARIABLE: DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES
32# @DESCRIPTION: 39# @DESCRIPTION:
33# Set this to use separate source directories for each enabled version of Python. 40# Set this to use separate source directories for each enabled version of Python.
34 41
35# @ECLASS-VARIABLE: DISTUTILS_GLOBAL_OPTIONS 42# @ECLASS-VARIABLE: DISTUTILS_GLOBAL_OPTIONS
36# @DESCRIPTION: 43# @DESCRIPTION:
37# Global options passed to setup.py. 44# Global options passed to setup.py.
38 45
46# @ECLASS-VARIABLE: DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS
47# @DESCRIPTION:
48# Set this to disable renaming of Python scripts containing versioned shebangs
49# and generation of wrapper scripts.
50
39# @ECLASS-VARIABLE: DOCS 51# @ECLASS-VARIABLE: DOCS
40# @DESCRIPTION: 52# @DESCRIPTION:
41# Additional DOCS 53# Additional DOCS
42 54
55_distutils_hook() {
56 if [[ "$#" -ne 1 ]]; then
57 die "${FUNCNAME}() requires 1 argument"
58 fi
59 if [[ "$(type -t "distutils_src_${EBUILD_PHASE}_$1_hook")" == "function" ]]; then
60 "distutils_src_${EBUILD_PHASE}_$1_hook"
61 fi
62}
63
43# @FUNCTION: distutils_src_unpack 64# @FUNCTION: distutils_src_unpack
44# @DESCRIPTION: 65# @DESCRIPTION:
45# The distutils src_unpack function, this function is exported 66# The distutils src_unpack function, this function is exported.
46distutils_src_unpack() { 67distutils_src_unpack() {
47 if [[ "${EBUILD_PHASE}" != "unpack" ]]; then 68 if [[ "${EBUILD_PHASE}" != "unpack" ]]; then
48 die "${FUNCNAME}() can be used only in src_unpack() phase" 69 die "${FUNCNAME}() can be used only in src_unpack() phase"
49 fi 70 fi
50 71
54 has "${EAPI:-0}" 0 1 && distutils_src_prepare 75 has "${EAPI:-0}" 0 1 && distutils_src_prepare
55} 76}
56 77
57# @FUNCTION: distutils_src_prepare 78# @FUNCTION: distutils_src_prepare
58# @DESCRIPTION: 79# @DESCRIPTION:
59# The distutils src_prepare function, this function is exported 80# The distutils src_prepare function, this function is exported.
60distutils_src_prepare() { 81distutils_src_prepare() {
61 if ! has "${EAPI:-0}" 0 1 && [[ "${EBUILD_PHASE}" != "prepare" ]]; then 82 if ! has "${EAPI:-0}" 0 1 && [[ "${EBUILD_PHASE}" != "prepare" ]]; then
62 die "${FUNCNAME}() can be used only in src_prepare() phase" 83 die "${FUNCNAME}() can be used only in src_prepare() phase"
63 fi 84 fi
64 85
65 # Delete ez_setup files to prevent packages from installing 86 # Delete ez_setup files to prevent packages from installing
66 # setuptools on their own. 87 # Setuptools on their own.
67 local ez_setup_py_existence 88 local ez_setup_existence="0"
68 [[ -f ez_setup.py ]] && ez_setup_py_existence="1" 89 [[ -d ez_setup || -f ez_setup.py ]] && ez_setup_existence="1"
69 rm -fr ez_setup* 90 rm -fr ez_setup*
70 if [[ "${ez_setup_py_existence}" == "1" ]]; then 91 if [[ "${ez_setup_existence}" == "1" ]]; then
71 echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py 92 echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py
93 fi
94
95 # Delete distribute_setup files to prevent packages from installing
96 # Distribute on their own.
97 local distribute_setup_existence="0"
98 [[ -d distribute_setup || -f distribute_setup.py ]] && distribute_setup_existence="1"
99 rm -fr distribute_setup*
100 if [[ "${distribute_setup_existence}" == "1" ]]; then
101 echo "def use_setuptools(*args, **kwargs): pass" > distribute_setup.py
72 fi 102 fi
73 103
74 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then 104 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
75 python_copy_sources 105 python_copy_sources
76 fi 106 fi
77} 107}
78 108
79# @FUNCTION: distutils_src_compile 109# @FUNCTION: distutils_src_compile
80# @DESCRIPTION: 110# @DESCRIPTION:
81# The distutils src_compile function, this function is exported 111# The distutils src_compile function, this function is exported.
112# In newer EAPIs this function calls distutils_src_compile_pre_hook() and
113# distutils_src_compile_post_hook(), if they are defined.
82distutils_src_compile() { 114distutils_src_compile() {
83 if [[ "${EBUILD_PHASE}" != "compile" ]]; then 115 if [[ "${EBUILD_PHASE}" != "compile" ]]; then
84 die "${FUNCNAME}() can be used only in src_compile() phase" 116 die "${FUNCNAME}() can be used only in src_compile() phase"
85 fi 117 fi
86 118
87 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then 119 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
88 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then 120 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
89 building() { 121 building() {
122 _distutils_hook pre
123
90 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" 124 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@"
91 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" 125 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || return "$?"
126
127 _distutils_hook post
92 } 128 }
93 python_execute_function -s building "$@" 129 python_execute_function -s building "$@"
94 else 130 else
95 building() { 131 building() {
132 _distutils_hook pre
133
96 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" "$@" 134 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" "$@"
97 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" "$@" 135 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" "$@" || return "$?"
136
137 _distutils_hook post
98 } 138 }
99 python_execute_function building "$@" 139 python_execute_function building "$@"
100 fi 140 fi
101 else 141 else
102 echo ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" 142 echo "$(PYTHON -A)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@"
103 ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die "Building failed" 143 "$(PYTHON -A)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die "Building failed"
104 fi 144 fi
105} 145}
106 146
107# @FUNCTION: distutils_src_install 147# @FUNCTION: distutils_src_install
108# @DESCRIPTION: 148# @DESCRIPTION:
109# The distutils src_install function, this function is exported. 149# The distutils src_install function, this function is exported.
150# In newer EAPIs this function calls distutils_src_install_pre_hook() and
151# distutils_src_install_post_hook(), if they are defined.
110# It also installs the "standard docs" (CHANGELOG, Change*, KNOWN_BUGS, MAINTAINERS, 152# It also installs the "standard docs" (CHANGELOG, Change*, KNOWN_BUGS, MAINTAINERS,
111# PKG-INFO, CONTRIBUTORS, TODO, NEWS, MANIFEST*, README*, and AUTHORS) 153# PKG-INFO, CONTRIBUTORS, TODO, NEWS, MANIFEST*, README*, and AUTHORS)
112distutils_src_install() { 154distutils_src_install() {
113 if [[ "${EBUILD_PHASE}" != "install" ]]; then 155 if [[ "${EBUILD_PHASE}" != "install" ]]; then
114 die "${FUNCNAME}() can be used only in src_install() phase" 156 die "${FUNCNAME}() can be used only in src_install() phase"
115 fi 157 fi
116 158
117 local pylibdir 159 local pylibdir
118 160
119 # Mark the package to be rebuilt after a python upgrade.
120 python_need_rebuild
121
122 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then 161 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
162 if [[ -z "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" && "${BASH_VERSINFO[0]}" -ge "4" ]]; then
163 declare -A wrapper_scripts=()
164
165 rename_scripts_with_versioned_shebangs() {
166 if [[ -d "${D}usr/bin" ]]; then
167 cd "${D}usr/bin"
168
169 local file
170 for file in *; do
171 if [[ -f "${file}" && ! "${file}" =~ [[:digit:]]+\.[[:digit:]]+$ && "$(head -n1 "${file}")" =~ ^'#!'.*python[[:digit:]]+\.[[:digit:]]+ ]]; then
172 mv "${file}" "${file}-${PYTHON_ABI}" || die "Renaming of '${file}' failed"
173 wrapper_scripts+=(["${D}usr/bin/${file}"]=)
174 fi
175 done
176 fi
177 }
178 fi
179
123 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then 180 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
124 installation() { 181 installation() {
182 _distutils_hook pre
183
125 # need this for python-2.5 + setuptools in cases where 184 # need this for python-2.5 + setuptools in cases where
126 # a package uses distutils but does not install anything 185 # a package uses distutils but does not install anything
127 # in site-packages. (eg. dev-java/java-config-2.x) 186 # in site-packages. (eg. dev-java/java-config-2.x)
128 # - liquidx (14/08/2006) 187 # - liquidx (14/08/2006)
129 pylibdir="$("$(PYTHON)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')" 188 pylibdir="$("$(PYTHON)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')"
130 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" 189 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}"
131 190
132 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" 191 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@"
133 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" 192 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" || return "$?"
193
194 if [[ -z "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" && "${BASH_VERSINFO[0]}" -ge "4" ]]; then
195 rename_scripts_with_versioned_shebangs
196 fi
197
198 _distutils_hook post
134 } 199 }
135 python_execute_function -s installation "$@" 200 python_execute_function -s installation "$@"
136 else 201 else
137 installation() { 202 installation() {
203 _distutils_hook pre
204
138 # need this for python-2.5 + setuptools in cases where 205 # need this for python-2.5 + setuptools in cases where
139 # a package uses distutils but does not install anything 206 # a package uses distutils but does not install anything
140 # in site-packages. (eg. dev-java/java-config-2.x) 207 # in site-packages. (eg. dev-java/java-config-2.x)
141 # - liquidx (14/08/2006) 208 # - liquidx (14/08/2006)
142 pylibdir="$("$(PYTHON)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')" 209 pylibdir="$("$(PYTHON)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')"
143 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" 210 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}"
144 211
145 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@" 212 echo "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@"
146 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@" 213 "$(PYTHON)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@" || return "$?"
214
215 if [[ -z "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" && "${BASH_VERSINFO[0]}" -ge "4" ]]; then
216 rename_scripts_with_versioned_shebangs
217 fi
218
219 _distutils_hook post
147 } 220 }
148 python_execute_function installation "$@" 221 python_execute_function installation "$@"
149 fi 222 fi
223
224 if [[ -z "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" && "${#wrapper_scripts[@]}" -ne "0" && "${BASH_VERSINFO[0]}" -ge "4" ]]; then
225 python_generate_wrapper_scripts "${!wrapper_scripts[@]}"
226 fi
227 unset wrapper_scripts
150 else 228 else
229 # Mark the package to be rebuilt after a Python upgrade.
230 python_need_rebuild
231
151 # need this for python-2.5 + setuptools in cases where 232 # need this for python-2.5 + setuptools in cases where
152 # a package uses distutils but does not install anything 233 # a package uses distutils but does not install anything
153 # in site-packages. (eg. dev-java/java-config-2.x) 234 # in site-packages. (eg. dev-java/java-config-2.x)
154 # - liquidx (14/08/2006) 235 # - liquidx (14/08/2006)
155 pylibdir="$(${python} -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')" 236 pylibdir="$("$(PYTHON -A)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')"
156 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" 237 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}"
157 238
158 echo ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" 239 echo "$(PYTHON -A)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@"
159 ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" || die "Installation failed" 240 "$(PYTHON -A)" setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" || die "Installation failed"
160 fi 241 fi
161 242
162 DDOCS="CHANGELOG KNOWN_BUGS MAINTAINERS PKG-INFO CONTRIBUTORS TODO NEWS" 243 if [[ -e "${D}usr/local" ]]; then
163 DDOCS="${DDOCS} Change* MANIFEST* README* AUTHORS" 244 die "Illegal installation into /usr/local"
245 fi
246
247 local default_docs
248 default_docs="AUTHORS Change* CHANGELOG CONTRIBUTORS KNOWN_BUGS MAINTAINERS MANIFEST* NEWS PKG-INFO README* TODO"
164 249
165 local doc 250 local doc
166 for doc in ${DDOCS}; do 251 for doc in ${default_docs}; do
167 [[ -s "$doc" ]] && dodoc $doc 252 [[ -s "${doc}" ]] && dodoc "${doc}"
168 done 253 done
169 254
170 [[ -n "${DOCS}" ]] && dodoc ${DOCS} 255 if [[ -n "${DOCS}" ]]; then
256 dodoc ${DOCS} || die "dodoc failed"
257 fi
171} 258}
172 259
173# @FUNCTION: distutils_pkg_postrm 260# @FUNCTION: distutils_pkg_postinst
174# @DESCRIPTION: 261# @DESCRIPTION:
175# Generic pyc/pyo cleanup script. This function is exported. 262# This is a generic optimization, you should override it if your package
263# installs modules in another directory. This function is exported.
176distutils_pkg_postrm() { 264distutils_pkg_postinst() {
177 if [[ "${EBUILD_PHASE}" != "postrm" ]]; then 265 if [[ "${EBUILD_PHASE}" != "postinst" ]]; then
178 die "${FUNCNAME}() can be used only in pkg_postrm() phase" 266 die "${FUNCNAME}() can be used only in pkg_postinst() phase"
179 fi 267 fi
180 268
181 local pylibdir pymod 269 local pylibdir pymod
182 if [[ -z "${PYTHON_MODNAME}" ]]; then 270 if [[ -z "${PYTHON_MODNAME}" ]]; then
183 for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do 271 for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do
185 PYTHON_MODNAME="${PN}" 273 PYTHON_MODNAME="${PN}"
186 fi 274 fi
187 done 275 done
188 fi 276 fi
189 277
190 if [[ -n "${PYTHON_MODNAME}" ]]; then 278 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
279 python_mod_optimize ${PYTHON_MODNAME}
280 else
191 for pymod in ${PYTHON_MODNAME}; do 281 for pymod in ${PYTHON_MODNAME}; do
192 for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do 282 python_mod_optimize "$(python_get_sitedir)/${pymod}"
193 if [[ -d "${pylibdir}/site-packages/${pymod}" ]]; then
194 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
195 python_mod_cleanup "${pymod}"
196 else
197 python_mod_cleanup "${pylibdir#${ROOT}}/site-packages/${pymod}"
198 fi
199 fi
200 done
201 done 283 done
202 else
203 python_mod_cleanup
204 fi 284 fi
205} 285}
206 286
207# @FUNCTION: distutils_pkg_postinst 287# @FUNCTION: distutils_pkg_postrm
208# @DESCRIPTION: 288# @DESCRIPTION:
209# This is a generic optimization, you should override it if your package 289# Generic pyc/pyo cleanup script. This function is exported.
210# installs modules in another directory. This function is exported.
211distutils_pkg_postinst() { 290distutils_pkg_postrm() {
212 if [[ "${EBUILD_PHASE}" != "postinst" ]]; then 291 if [[ "${EBUILD_PHASE}" != "postrm" ]]; then
213 die "${FUNCNAME}() can be used only in pkg_postinst() phase" 292 die "${FUNCNAME}() can be used only in pkg_postrm() phase"
214 fi 293 fi
215 294
216 local pylibdir pymod 295 local pylibdir pymod
217 if [[ -z "${PYTHON_MODNAME}" ]]; then 296 if [[ -z "${PYTHON_MODNAME}" ]]; then
218 for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do 297 for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do
220 PYTHON_MODNAME="${PN}" 299 PYTHON_MODNAME="${PN}"
221 fi 300 fi
222 done 301 done
223 fi 302 fi
224 303
304 if [[ -n "${PYTHON_MODNAME}" ]]; then
225 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then 305 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
306 python_mod_cleanup ${PYTHON_MODNAME}
307 else
226 for pymod in ${PYTHON_MODNAME}; do 308 for pymod in ${PYTHON_MODNAME}; do
227 python_mod_optimize "${pymod}" 309 for pylibdir in "${ROOT}"/usr/$(get_libdir)/python*; do
310 if [[ -d "${pylibdir}/site-packages/${pymod}" ]]; then
311 python_mod_cleanup "${pylibdir#${ROOT}}/site-packages/${pymod}"
312 fi
313 done
228 done 314 done
315 fi
229 else 316 else
230 python_version 317 python_mod_cleanup
231 for pymod in ${PYTHON_MODNAME}; do
232 python_mod_optimize "/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}"
233 done
234 fi 318 fi
235} 319}
236 320
237# @FUNCTION: distutils_python_version 321# @FUNCTION: distutils_python_version
238# @DESCRIPTION: 322# @DESCRIPTION:
239# Calls python_version, so that you can use something like 323# Calls python_version, so that you can use something like
240# e.g. insinto ${ROOT}/usr/include/python${PYVER} 324# e.g. insinto $(python_get_includedir)
241distutils_python_version() { 325distutils_python_version() {
326 if ! has "${EAPI:-0}" 0 1 2; then
327 die "${FUNCNAME}() cannot be used in this EAPI"
328 fi
329
242 python_version 330 python_version
243} 331}
244 332
245# @FUNCTION: distutils_python_tkinter 333# @FUNCTION: distutils_python_tkinter
246# @DESCRIPTION: 334# @DESCRIPTION:
247# Checks for if tkinter support is compiled into python 335# Checks for if tkinter support is compiled into python
248distutils_python_tkinter() { 336distutils_python_tkinter() {
337 if ! has "${EAPI:-0}" 0 1 2; then
338 die "${FUNCNAME}() cannot be used in this EAPI"
339 fi
340
249 python_tkinter_exists 341 python_tkinter_exists
250} 342}

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.69

  ViewVC Help
Powered by ViewVC 1.1.20