1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # @ECLASS: distutils.eclass
7 # Gentoo Python Project <python@gentoo.org>
8 # @BLURB: Eclass for packages with build systems using Distutils
10 # The distutils eclass defines phase functions for packages with build systems using Distutils.
12 # This eclass is DEPRECATED. Please use distutils-r1 instead.
14 if [[ -z "${_PYTHON_ECLASS_INHERITED}" ]]; then
22 die "${ECLASS}.eclass is banned in EAPI ${EAPI}"
25 EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
28 EXPORT_FUNCTIONS src_prepare src_compile src_install pkg_postinst pkg_postrm
32 if [[ -z "$(declare -p PYTHON_DEPEND 2> /dev/null)" ]]; then
33 DEPEND="dev-lang/python"
37 if has "${EAPI:-0}" 0 1 && [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
39 ewarn "\"${EBUILD}\":"
40 ewarn "Deprecation Warning: Usage of distutils.eclass in packages supporting installation"
41 ewarn "for multiple Python ABIs in EAPI <=1 is deprecated."
42 ewarn "The ebuild should to be fixed. Please report a bug, if it has not been already reported."
44 elif has "${EAPI:-0}" 0 1 2 && [[ -z "${SUPPORT_PYTHON_ABIS}" ]]; then
46 ewarn "\"${EBUILD}\":"
47 ewarn "Deprecation Warning: Usage of distutils.eclass in packages not supporting installation"
48 ewarn "for multiple Python ABIs in EAPI <=2 is deprecated."
49 ewarn "The ebuild should to be fixed. Please report a bug, if it has not been already reported."
53 # 'python' variable is deprecated. Use PYTHON() instead.
54 if has "${EAPI:-0}" 0 1 2 && [[ -z "${SUPPORT_PYTHON_ABIS}" ]]; then
60 # @ECLASS-VARIABLE: DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES
62 # Set this to use separate source directories for each enabled version of Python.
64 # @ECLASS-VARIABLE: DISTUTILS_SETUP_FILES
66 # Array of paths to setup files.
68 # [current_working_directory|]path_to_setup_file
70 # @ECLASS-VARIABLE: DISTUTILS_GLOBAL_OPTIONS
72 # Array of global options passed to setup files.
76 # Python_ABI_pattern global_option
78 # @ECLASS-VARIABLE: DISTUTILS_SRC_TEST
80 # Type of test command used by distutils_src_test().
81 # IUSE and DEPEND are automatically adjusted, unless DISTUTILS_DISABLE_TEST_DEPENDENCY is set.
88 # @ECLASS-VARIABLE: DISTUTILS_DISABLE_TEST_DEPENDENCY
90 # Disable modification of IUSE and DEPEND caused by setting of DISTUTILS_SRC_TEST.
92 if [[ -n "${DISTUTILS_SRC_TEST}" && ! "${DISTUTILS_SRC_TEST}" =~ ^(setup\.py|nosetests|py\.test|trial(\ .*)?)$ ]]; then
93 die "'DISTUTILS_SRC_TEST' variable has unsupported value '${DISTUTILS_SRC_TEST}'"
96 if [[ -z "${DISTUTILS_DISABLE_TEST_DEPENDENCY}" ]]; then
97 if [[ "${DISTUTILS_SRC_TEST}" == "nosetests" ]]; then
99 DEPEND+="${DEPEND:+ }test? ( dev-python/nose )"
100 elif [[ "${DISTUTILS_SRC_TEST}" == "py.test" ]]; then
102 DEPEND+="${DEPEND:+ }test? ( dev-python/pytest )"
103 # trial requires an argument, which is usually equal to "${PN}".
104 elif [[ "${DISTUTILS_SRC_TEST}" =~ ^trial(\ .*)?$ ]]; then
106 DEPEND+="${DEPEND:+ }test? ( dev-python/twisted-core )"
110 if [[ -n "${DISTUTILS_SRC_TEST}" ]]; then
111 EXPORT_FUNCTIONS src_test
114 # Scheduled for deletion on 2011-06-01.
115 if [[ -n "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" ]]; then
116 eerror "Use PYTHON_NONVERSIONED_EXECUTABLES=(\".*\") instead of DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS variable."
117 die "DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS variable is banned"
120 # @ECLASS-VARIABLE: DOCS
122 # Additional documentation files installed by distutils_src_install().
124 _distutils_get_build_dir() {
125 if _python_package_supporting_installation_for_multiple_python_abis && [[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
126 echo "build-${PYTHON_ABI}"
132 _distutils_get_PYTHONPATH() {
133 if _python_package_supporting_installation_for_multiple_python_abis && [[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
134 ls -d build-${PYTHON_ABI}/lib* 2> /dev/null
136 ls -d build/lib* 2> /dev/null
141 if [[ "$#" -ne 1 ]]; then
142 die "${FUNCNAME}() requires 1 argument"
144 if [[ "$(type -t "distutils_src_${EBUILD_PHASE}_$1_hook")" == "function" ]]; then
145 "distutils_src_${EBUILD_PHASE}_$1_hook"
149 _distutils_prepare_global_options() {
150 local element option pattern
152 if [[ -n "$(declare -p DISTUTILS_GLOBAL_OPTIONS 2> /dev/null)" && "$(declare -p DISTUTILS_GLOBAL_OPTIONS)" != "declare -a DISTUTILS_GLOBAL_OPTIONS="* ]]; then
153 die "DISTUTILS_GLOBAL_OPTIONS should be indexed array"
156 if has "${EAPI:-0}" 0 1 2 3; then
157 _DISTUTILS_GLOBAL_OPTIONS=("${DISTUTILS_GLOBAL_OPTIONS[@]}")
159 _DISTUTILS_GLOBAL_OPTIONS=()
161 for element in "${DISTUTILS_GLOBAL_OPTIONS[@]}"; do
162 if [[ ! "${element}" =~ ^[^[:space:]]+\ . ]]; then
163 die "Element '${element}' of DISTUTILS_GLOBAL_OPTIONS array has invalid syntax"
165 pattern="${element%% *}"
166 option="${element#* }"
167 if _python_check_python_abi_matching "${PYTHON_ABI}" "${pattern}"; then
168 _DISTUTILS_GLOBAL_OPTIONS+=("${option}")
174 _distutils_prepare_current_working_directory() {
175 if [[ "$1" == *"|"*"|"* ]]; then
176 die "Element '$1' of DISTUTILS_SETUP_FILES array has invalid syntax"
179 if [[ "$1" == *"|"* ]]; then
180 echo "${_BOLD}[${1%|*}]${_NORMAL}"
181 pushd "${1%|*}" > /dev/null || die "Entering directory '${1%|*}' failed"
185 _distutils_restore_current_working_directory() {
186 if [[ "$1" == *"|"* ]]; then
187 popd > /dev/null || die "Leaving directory '${1%|*}' failed"
191 # @FUNCTION: distutils_src_unpack
193 # The distutils src_unpack function. This function is exported.
194 distutils_src_unpack() {
195 if ! has "${EAPI:-0}" 0 1; then
196 die "${FUNCNAME}() cannot be used in this EAPI"
199 if [[ "${EBUILD_PHASE}" != "unpack" ]]; then
200 die "${FUNCNAME}() can be used only in src_unpack() phase"
206 distutils_src_prepare
209 # @FUNCTION: distutils_src_prepare
211 # The distutils src_prepare function. This function is exported.
212 distutils_src_prepare() {
213 if ! has "${EAPI:-0}" 0 1 && [[ "${EBUILD_PHASE}" != "prepare" ]]; then
214 die "${FUNCNAME}() can be used only in src_prepare() phase"
217 _python_check_python_pkg_setup_execution
219 local distribute_setup_existence="0" ez_setup_existence="0"
221 if [[ "$#" -ne 0 ]]; then
222 die "${FUNCNAME}() does not accept arguments"
225 # Delete ez_setup files to prevent packages from installing Setuptools on their own.
226 [[ -d ez_setup || -f ez_setup.py ]] && ez_setup_existence="1"
228 if [[ "${ez_setup_existence}" == "1" ]]; then
229 echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py
232 # Delete distribute_setup files to prevent packages from installing Distribute on their own.
233 [[ -d distribute_setup || -f distribute_setup.py ]] && distribute_setup_existence="1"
234 rm -fr distribute_setup*
235 if [[ "${distribute_setup_existence}" == "1" ]]; then
236 echo "def use_setuptools(*args, **kwargs): pass" > distribute_setup.py
239 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
244 # @FUNCTION: distutils_src_compile
246 # The distutils src_compile function. This function is exported.
247 # In ebuilds of packages supporting installation for multiple versions of Python, this function
248 # calls distutils_src_compile_pre_hook() and distutils_src_compile_post_hook(), if they are defined.
249 distutils_src_compile() {
250 if [[ "${EBUILD_PHASE}" != "compile" ]]; then
251 die "${FUNCNAME}() can be used only in src_compile() phase"
254 _python_check_python_pkg_setup_execution
255 _python_set_color_variables
259 if _python_package_supporting_installation_for_multiple_python_abis; then
260 distutils_building() {
263 _distutils_prepare_global_options
265 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
266 _distutils_prepare_current_working_directory "${setup_file}"
268 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "$(_distutils_get_build_dir)" "$@"${_NORMAL}
269 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "$(_distutils_get_build_dir)" "$@" || return "$?"
271 _distutils_restore_current_working_directory "${setup_file}"
276 python_execute_function ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} distutils_building "$@"
277 unset -f distutils_building
279 _distutils_prepare_global_options
281 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
282 _distutils_prepare_current_working_directory "${setup_file}"
284 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@"${_NORMAL}
285 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die "Building failed"
287 _distutils_restore_current_working_directory "${setup_file}"
292 _distutils_src_test_hook() {
293 if [[ "$#" -ne 1 ]]; then
294 die "${FUNCNAME}() requires 1 arguments"
297 if ! _python_package_supporting_installation_for_multiple_python_abis; then
301 if [[ "$(type -t "distutils_src_test_pre_hook")" == "function" ]]; then
302 eval "python_execute_$1_pre_hook() {
303 distutils_src_test_pre_hook
307 if [[ "$(type -t "distutils_src_test_post_hook")" == "function" ]]; then
308 eval "python_execute_$1_post_hook() {
309 distutils_src_test_post_hook
314 # @FUNCTION: distutils_src_test
316 # The distutils src_test function. This function is exported, when DISTUTILS_SRC_TEST variable is set.
317 # In ebuilds of packages supporting installation for multiple versions of Python, this function
318 # calls distutils_src_test_pre_hook() and distutils_src_test_post_hook(), if they are defined.
319 distutils_src_test() {
320 if [[ "${EBUILD_PHASE}" != "test" ]]; then
321 die "${FUNCNAME}() can be used only in src_test() phase"
324 _python_check_python_pkg_setup_execution
325 _python_set_color_variables
327 local arguments setup_file
329 if [[ "${DISTUTILS_SRC_TEST}" == "setup.py" ]]; then
330 if _python_package_supporting_installation_for_multiple_python_abis; then
331 distutils_testing() {
334 _distutils_prepare_global_options
336 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
337 _distutils_prepare_current_working_directory "${setup_file}"
339 echo ${_BOLD}PYTHONPATH="$(_distutils_get_PYTHONPATH)" "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" $([[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]] && echo build -b "$(_distutils_get_build_dir)") test "$@"${_NORMAL}
340 PYTHONPATH="$(_distutils_get_PYTHONPATH)" "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" $([[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]] && echo build -b "$(_distutils_get_build_dir)") test "$@" || return "$?"
342 _distutils_restore_current_working_directory "${setup_file}"
347 python_execute_function ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} distutils_testing "$@"
348 unset -f distutils_testing
350 _distutils_prepare_global_options
352 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
353 _distutils_prepare_current_working_directory "${setup_file}"
355 echo ${_BOLD}PYTHONPATH="$(_distutils_get_PYTHONPATH)" "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" test "$@"${_NORMAL}
356 PYTHONPATH="$(_distutils_get_PYTHONPATH)" "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" test "$@" || die "Testing failed"
358 _distutils_restore_current_working_directory "${setup_file}"
361 elif [[ "${DISTUTILS_SRC_TEST}" == "nosetests" ]]; then
362 _distutils_src_test_hook nosetests
364 python_execute_nosetests -P '$(_distutils_get_PYTHONPATH)' ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} -- "$@"
365 elif [[ "${DISTUTILS_SRC_TEST}" == "py.test" ]]; then
366 _distutils_src_test_hook py.test
368 python_execute_py.test -P '$(_distutils_get_PYTHONPATH)' ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} -- "$@"
369 # trial requires an argument, which is usually equal to "${PN}".
370 elif [[ "${DISTUTILS_SRC_TEST}" =~ ^trial(\ .*)?$ ]]; then
371 if [[ "${DISTUTILS_SRC_TEST}" == "trial "* ]]; then
372 arguments="${DISTUTILS_SRC_TEST#trial }"
377 _distutils_src_test_hook trial
379 python_execute_trial -P '$(_distutils_get_PYTHONPATH)' ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} -- ${arguments} "$@"
381 die "'DISTUTILS_SRC_TEST' variable has unsupported value '${DISTUTILS_SRC_TEST}'"
385 # @FUNCTION: distutils_src_install
387 # The distutils src_install function. This function is exported.
388 # In ebuilds of packages supporting installation for multiple versions of Python, this function
389 # calls distutils_src_install_pre_hook() and distutils_src_install_post_hook(), if they are defined.
390 # It also installs some standard documentation files (AUTHORS, Change*, CHANGELOG, CONTRIBUTORS,
391 # KNOWN_BUGS, MAINTAINERS, NEWS, README*, TODO).
392 distutils_src_install() {
393 if [[ "${EBUILD_PHASE}" != "install" ]]; then
394 die "${FUNCNAME}() can be used only in src_install() phase"
397 _python_check_python_pkg_setup_execution
398 _python_initialize_prefix_variables
399 _python_set_color_variables
401 local default_docs doc line nspkg_pth_file nspkg_pth_files=() setup_file
403 if _python_package_supporting_installation_for_multiple_python_abis; then
404 distutils_installation() {
407 _distutils_prepare_global_options
409 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
410 _distutils_prepare_current_working_directory "${setup_file}"
412 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" $([[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]] && echo build -b "$(_distutils_get_build_dir)") install --no-compile --root="${T}/images/${PYTHON_ABI}" "$@"${_NORMAL}
413 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" $([[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]] && echo build -b "$(_distutils_get_build_dir)") install --no-compile --root="${T}/images/${PYTHON_ABI}" "$@" || return "$?"
415 _distutils_restore_current_working_directory "${setup_file}"
420 python_execute_function ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} distutils_installation "$@"
421 unset -f distutils_installation
423 python_merge_intermediate_installation_images "${T}/images"
425 # Mark the package to be rebuilt after a Python upgrade.
428 _distutils_prepare_global_options
430 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
431 _distutils_prepare_current_working_directory "${setup_file}"
433 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@"${_NORMAL}
434 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" || die "Installation failed"
436 _distutils_restore_current_working_directory "${setup_file}"
440 while read -d $'\0' -r nspkg_pth_file; do
441 nspkg_pth_files+=("${nspkg_pth_file}")
442 done < <(find "${ED}" -name "*-nspkg.pth" -type f -print0)
444 if [[ "${#nspkg_pth_files[@]}" -gt 0 ]]; then
446 einfo "Python namespaces:"
447 for nspkg_pth_file in "${nspkg_pth_files[@]}"; do
448 einfo " '${nspkg_pth_file#${ED%/}}':"
449 while read -r line; do
450 einfo " $(echo "${line}" | sed -e "s/.*types\.ModuleType('\([^']\+\)').*/\1/")"
451 done < "${nspkg_pth_file}"
452 #if ! has "${EAPI:-0}" 0 1 2 3; then
453 # rm -f "${nspkg_pth_file}" || die "Deletion of '${nspkg_pth_file}' failed"
459 if [[ -e "${ED}usr/local" ]]; then
460 die "Illegal installation into /usr/local"
463 default_docs="AUTHORS Change* CHANGELOG CONTRIBUTORS KNOWN_BUGS MAINTAINERS NEWS README* TODO"
465 for doc in ${default_docs}; do
466 [[ -s "${doc}" ]] && dodoc "${doc}"
469 if has "${EAPI:-0}" 0 1 2 3; then
470 if [[ -n "${DOCS}" ]]; then
471 dodoc ${DOCS} || die "dodoc failed"
474 if [[ -n "${DOCS}" ]]; then
475 dodoc -r ${DOCS} || die "dodoc failed"
479 DISTUTILS_SRC_INSTALL_EXECUTED="1"
482 # @FUNCTION: distutils_pkg_postinst
484 # The distutils pkg_postinst function. This function is exported.
485 # When PYTHON_MODNAME variable is set, then this function calls python_mod_optimize() with modules
486 # specified in PYTHON_MODNAME variable. Otherwise it calls python_mod_optimize() with module, whose
487 # name is equal to name of current package, if this module exists.
488 distutils_pkg_postinst() {
489 if [[ "${EBUILD_PHASE}" != "postinst" ]]; then
490 die "${FUNCNAME}() can be used only in pkg_postinst() phase"
493 _python_check_python_pkg_setup_execution
494 _python_initialize_prefix_variables
496 if [[ -z "${DISTUTILS_SRC_INSTALL_EXECUTED}" ]]; then
497 die "${FUNCNAME}() called illegally"
502 if [[ "$#" -ne 0 ]]; then
503 die "${FUNCNAME}() does not accept arguments"
506 if [[ -z "$(declare -p PYTHON_MODNAME 2> /dev/null)" ]]; then
507 for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"usr/share/jython-*/Lib; do
508 if [[ -d "${pylibdir}/site-packages/${PN}" ]]; then
509 PYTHON_MODNAME="${PN}"
514 if [[ -n "${PYTHON_MODNAME}" ]]; then
515 if ! has "${EAPI:-0}" 0 1 2 || _python_package_supporting_installation_for_multiple_python_abis; then
516 python_mod_optimize ${PYTHON_MODNAME}
518 for pymod in ${PYTHON_MODNAME}; do
519 python_mod_optimize "$(python_get_sitedir)/${pymod}"
525 # @FUNCTION: distutils_pkg_postrm
527 # The distutils pkg_postrm function. This function is exported.
528 # When PYTHON_MODNAME variable is set, then this function calls python_mod_cleanup() with modules
529 # specified in PYTHON_MODNAME variable. Otherwise it calls python_mod_cleanup() with module, whose
530 # name is equal to name of current package, if this module exists.
531 distutils_pkg_postrm() {
532 if [[ "${EBUILD_PHASE}" != "postrm" ]]; then
533 die "${FUNCNAME}() can be used only in pkg_postrm() phase"
536 _python_check_python_pkg_setup_execution
537 _python_initialize_prefix_variables
539 if [[ -z "${DISTUTILS_SRC_INSTALL_EXECUTED}" ]]; then
540 die "${FUNCNAME}() called illegally"
545 if [[ "$#" -ne 0 ]]; then
546 die "${FUNCNAME}() does not accept arguments"
549 if [[ -z "$(declare -p PYTHON_MODNAME 2> /dev/null)" ]]; then
550 for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"usr/share/jython-*/Lib; do
551 if [[ -d "${pylibdir}/site-packages/${PN}" ]]; then
552 PYTHON_MODNAME="${PN}"
557 if [[ -n "${PYTHON_MODNAME}" ]]; then
558 if ! has "${EAPI:-0}" 0 1 2 || _python_package_supporting_installation_for_multiple_python_abis; then
559 python_mod_cleanup ${PYTHON_MODNAME}
561 for pymod in ${PYTHON_MODNAME}; do
562 for pylibdir in "${EROOT}"usr/$(get_libdir)/python*; do
563 if [[ -d "${pylibdir}/site-packages/${pymod}" ]]; then
564 python_mod_cleanup "${pylibdir#${EROOT%/}}/site-packages/${pymod}"
572 # @FUNCTION: distutils_get_intermediate_installation_image
574 # Print path to intermediate installation image.
576 # This function can be used only in distutils_src_install_pre_hook() and distutils_src_install_post_hook().
577 distutils_get_intermediate_installation_image() {
578 if [[ "${EBUILD_PHASE}" != "install" ]]; then
579 die "${FUNCNAME}() can be used only in src_install() phase"
582 if ! _python_package_supporting_installation_for_multiple_python_abis; then
583 die "${FUNCNAME}() cannot be used in ebuilds of packages not supporting installation for multiple Python ABIs"
586 _python_check_python_pkg_setup_execution
588 if [[ ! "${FUNCNAME[1]}" =~ ^distutils_src_install_(pre|post)_hook$ ]]; then
589 die "${FUNCNAME}() can be used only in distutils_src_install_pre_hook() and distutils_src_install_post_hook()"
592 if [[ "$#" -ne 0 ]]; then
593 die "${FUNCNAME}() does not accept arguments"
596 echo "${T}/images/${PYTHON_ABI}"