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 EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
25 EXPORT_FUNCTIONS src_prepare src_compile src_install pkg_postinst pkg_postrm
29 if [[ -z "$(declare -p PYTHON_DEPEND 2> /dev/null)" ]]; then
30 DEPEND="dev-lang/python"
34 if has "${EAPI:-0}" 0 1 && [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
36 ewarn "\"${EBUILD}\":"
37 ewarn "Deprecation Warning: Usage of distutils.eclass in packages supporting installation"
38 ewarn "for multiple Python ABIs in EAPI <=1 is deprecated."
39 ewarn "The ebuild should to be fixed. Please report a bug, if it has not been already reported."
41 elif has "${EAPI:-0}" 0 1 2 && [[ -z "${SUPPORT_PYTHON_ABIS}" ]]; then
43 ewarn "\"${EBUILD}\":"
44 ewarn "Deprecation Warning: Usage of distutils.eclass in packages not supporting installation"
45 ewarn "for multiple Python ABIs in EAPI <=2 is deprecated."
46 ewarn "The ebuild should to be fixed. Please report a bug, if it has not been already reported."
50 # 'python' variable is deprecated. Use PYTHON() instead.
51 if has "${EAPI:-0}" 0 1 2 && [[ -z "${SUPPORT_PYTHON_ABIS}" ]]; then
57 # @ECLASS-VARIABLE: DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES
59 # Set this to use separate source directories for each enabled version of Python.
61 # @ECLASS-VARIABLE: DISTUTILS_SETUP_FILES
63 # Array of paths to setup files.
65 # [current_working_directory|]path_to_setup_file
67 # @ECLASS-VARIABLE: DISTUTILS_GLOBAL_OPTIONS
69 # Array of global options passed to setup files.
73 # Python_ABI_pattern global_option
75 # @ECLASS-VARIABLE: DISTUTILS_SRC_TEST
77 # Type of test command used by distutils_src_test().
78 # IUSE and DEPEND are automatically adjusted, unless DISTUTILS_DISABLE_TEST_DEPENDENCY is set.
85 # @ECLASS-VARIABLE: DISTUTILS_DISABLE_TEST_DEPENDENCY
87 # Disable modification of IUSE and DEPEND caused by setting of DISTUTILS_SRC_TEST.
89 if [[ -n "${DISTUTILS_SRC_TEST}" && ! "${DISTUTILS_SRC_TEST}" =~ ^(setup\.py|nosetests|py\.test|trial(\ .*)?)$ ]]; then
90 die "'DISTUTILS_SRC_TEST' variable has unsupported value '${DISTUTILS_SRC_TEST}'"
93 if [[ -z "${DISTUTILS_DISABLE_TEST_DEPENDENCY}" ]]; then
94 if [[ "${DISTUTILS_SRC_TEST}" == "nosetests" ]]; then
96 DEPEND+="${DEPEND:+ }test? ( dev-python/nose )"
97 elif [[ "${DISTUTILS_SRC_TEST}" == "py.test" ]]; then
99 DEPEND+="${DEPEND:+ }test? ( dev-python/pytest )"
100 # trial requires an argument, which is usually equal to "${PN}".
101 elif [[ "${DISTUTILS_SRC_TEST}" =~ ^trial(\ .*)?$ ]]; then
103 DEPEND+="${DEPEND:+ }test? ( dev-python/twisted-core )"
107 if [[ -n "${DISTUTILS_SRC_TEST}" ]]; then
108 EXPORT_FUNCTIONS src_test
111 # Scheduled for deletion on 2011-06-01.
112 if [[ -n "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" ]]; then
113 eerror "Use PYTHON_NONVERSIONED_EXECUTABLES=(\".*\") instead of DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS variable."
114 die "DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS variable is banned"
117 # @ECLASS-VARIABLE: DOCS
119 # Additional documentation files installed by distutils_src_install().
121 _distutils_get_build_dir() {
122 if _python_package_supporting_installation_for_multiple_python_abis && [[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
123 echo "build-${PYTHON_ABI}"
129 _distutils_get_PYTHONPATH() {
130 if _python_package_supporting_installation_for_multiple_python_abis && [[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
131 ls -d build-${PYTHON_ABI}/lib* 2> /dev/null
133 ls -d build/lib* 2> /dev/null
138 if [[ "$#" -ne 1 ]]; then
139 die "${FUNCNAME}() requires 1 argument"
141 if [[ "$(type -t "distutils_src_${EBUILD_PHASE}_$1_hook")" == "function" ]]; then
142 "distutils_src_${EBUILD_PHASE}_$1_hook"
146 _distutils_prepare_global_options() {
147 local element option pattern
149 if [[ -n "$(declare -p DISTUTILS_GLOBAL_OPTIONS 2> /dev/null)" && "$(declare -p DISTUTILS_GLOBAL_OPTIONS)" != "declare -a DISTUTILS_GLOBAL_OPTIONS="* ]]; then
150 die "DISTUTILS_GLOBAL_OPTIONS should be indexed array"
153 if has "${EAPI:-0}" 0 1 2 3; then
154 _DISTUTILS_GLOBAL_OPTIONS=("${DISTUTILS_GLOBAL_OPTIONS[@]}")
156 _DISTUTILS_GLOBAL_OPTIONS=()
158 for element in "${DISTUTILS_GLOBAL_OPTIONS[@]}"; do
159 if [[ ! "${element}" =~ ^[^[:space:]]+\ . ]]; then
160 die "Element '${element}' of DISTUTILS_GLOBAL_OPTIONS array has invalid syntax"
162 pattern="${element%% *}"
163 option="${element#* }"
164 if _python_check_python_abi_matching "${PYTHON_ABI}" "${pattern}"; then
165 _DISTUTILS_GLOBAL_OPTIONS+=("${option}")
171 _distutils_prepare_current_working_directory() {
172 if [[ "$1" == *"|"*"|"* ]]; then
173 die "Element '$1' of DISTUTILS_SETUP_FILES array has invalid syntax"
176 if [[ "$1" == *"|"* ]]; then
177 echo "${_BOLD}[${1%|*}]${_NORMAL}"
178 pushd "${1%|*}" > /dev/null || die "Entering directory '${1%|*}' failed"
182 _distutils_restore_current_working_directory() {
183 if [[ "$1" == *"|"* ]]; then
184 popd > /dev/null || die "Leaving directory '${1%|*}' failed"
188 # @FUNCTION: distutils_src_unpack
190 # The distutils src_unpack function. This function is exported.
191 distutils_src_unpack() {
192 if ! has "${EAPI:-0}" 0 1; then
193 die "${FUNCNAME}() cannot be used in this EAPI"
196 if [[ "${EBUILD_PHASE}" != "unpack" ]]; then
197 die "${FUNCNAME}() can be used only in src_unpack() phase"
203 distutils_src_prepare
206 # @FUNCTION: distutils_src_prepare
208 # The distutils src_prepare function. This function is exported.
209 distutils_src_prepare() {
210 if ! has "${EAPI:-0}" 0 1 && [[ "${EBUILD_PHASE}" != "prepare" ]]; then
211 die "${FUNCNAME}() can be used only in src_prepare() phase"
214 _python_check_python_pkg_setup_execution
216 local distribute_setup_existence="0" ez_setup_existence="0"
218 if [[ "$#" -ne 0 ]]; then
219 die "${FUNCNAME}() does not accept arguments"
222 # Delete ez_setup files to prevent packages from installing Setuptools on their own.
223 [[ -d ez_setup || -f ez_setup.py ]] && ez_setup_existence="1"
225 if [[ "${ez_setup_existence}" == "1" ]]; then
226 echo "def use_setuptools(*args, **kwargs): pass" > ez_setup.py
229 # Delete distribute_setup files to prevent packages from installing Distribute on their own.
230 [[ -d distribute_setup || -f distribute_setup.py ]] && distribute_setup_existence="1"
231 rm -fr distribute_setup*
232 if [[ "${distribute_setup_existence}" == "1" ]]; then
233 echo "def use_setuptools(*args, **kwargs): pass" > distribute_setup.py
236 if [[ -n "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then
241 # @FUNCTION: distutils_src_compile
243 # The distutils src_compile function. This function is exported.
244 # In ebuilds of packages supporting installation for multiple versions of Python, this function
245 # calls distutils_src_compile_pre_hook() and distutils_src_compile_post_hook(), if they are defined.
246 distutils_src_compile() {
247 if [[ "${EBUILD_PHASE}" != "compile" ]]; then
248 die "${FUNCNAME}() can be used only in src_compile() phase"
251 _python_check_python_pkg_setup_execution
252 _python_set_color_variables
256 if _python_package_supporting_installation_for_multiple_python_abis; then
257 distutils_building() {
260 _distutils_prepare_global_options
262 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
263 _distutils_prepare_current_working_directory "${setup_file}"
265 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "$(_distutils_get_build_dir)" "$@"${_NORMAL}
266 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "$(_distutils_get_build_dir)" "$@" || return "$?"
268 _distutils_restore_current_working_directory "${setup_file}"
273 python_execute_function ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} distutils_building "$@"
274 unset -f distutils_building
276 _distutils_prepare_global_options
278 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
279 _distutils_prepare_current_working_directory "${setup_file}"
281 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@"${_NORMAL}
282 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die "Building failed"
284 _distutils_restore_current_working_directory "${setup_file}"
289 _distutils_src_test_hook() {
290 if [[ "$#" -ne 1 ]]; then
291 die "${FUNCNAME}() requires 1 arguments"
294 if ! _python_package_supporting_installation_for_multiple_python_abis; then
298 if [[ "$(type -t "distutils_src_test_pre_hook")" == "function" ]]; then
299 eval "python_execute_$1_pre_hook() {
300 distutils_src_test_pre_hook
304 if [[ "$(type -t "distutils_src_test_post_hook")" == "function" ]]; then
305 eval "python_execute_$1_post_hook() {
306 distutils_src_test_post_hook
311 # @FUNCTION: distutils_src_test
313 # The distutils src_test function. This function is exported, when DISTUTILS_SRC_TEST variable is set.
314 # In ebuilds of packages supporting installation for multiple versions of Python, this function
315 # calls distutils_src_test_pre_hook() and distutils_src_test_post_hook(), if they are defined.
316 distutils_src_test() {
317 if [[ "${EBUILD_PHASE}" != "test" ]]; then
318 die "${FUNCNAME}() can be used only in src_test() phase"
321 _python_check_python_pkg_setup_execution
322 _python_set_color_variables
324 local arguments setup_file
326 if [[ "${DISTUTILS_SRC_TEST}" == "setup.py" ]]; then
327 if _python_package_supporting_installation_for_multiple_python_abis; then
328 distutils_testing() {
331 _distutils_prepare_global_options
333 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
334 _distutils_prepare_current_working_directory "${setup_file}"
336 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}
337 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 "$?"
339 _distutils_restore_current_working_directory "${setup_file}"
344 python_execute_function ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} distutils_testing "$@"
345 unset -f distutils_testing
347 _distutils_prepare_global_options
349 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
350 _distutils_prepare_current_working_directory "${setup_file}"
352 echo ${_BOLD}PYTHONPATH="$(_distutils_get_PYTHONPATH)" "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" test "$@"${_NORMAL}
353 PYTHONPATH="$(_distutils_get_PYTHONPATH)" "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" test "$@" || die "Testing failed"
355 _distutils_restore_current_working_directory "${setup_file}"
358 elif [[ "${DISTUTILS_SRC_TEST}" == "nosetests" ]]; then
359 _distutils_src_test_hook nosetests
361 python_execute_nosetests -P '$(_distutils_get_PYTHONPATH)' ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} -- "$@"
362 elif [[ "${DISTUTILS_SRC_TEST}" == "py.test" ]]; then
363 _distutils_src_test_hook py.test
365 python_execute_py.test -P '$(_distutils_get_PYTHONPATH)' ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} -- "$@"
366 # trial requires an argument, which is usually equal to "${PN}".
367 elif [[ "${DISTUTILS_SRC_TEST}" =~ ^trial(\ .*)?$ ]]; then
368 if [[ "${DISTUTILS_SRC_TEST}" == "trial "* ]]; then
369 arguments="${DISTUTILS_SRC_TEST#trial }"
374 _distutils_src_test_hook trial
376 python_execute_trial -P '$(_distutils_get_PYTHONPATH)' ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} -- ${arguments} "$@"
378 die "'DISTUTILS_SRC_TEST' variable has unsupported value '${DISTUTILS_SRC_TEST}'"
382 # @FUNCTION: distutils_src_install
384 # The distutils src_install function. This function is exported.
385 # In ebuilds of packages supporting installation for multiple versions of Python, this function
386 # calls distutils_src_install_pre_hook() and distutils_src_install_post_hook(), if they are defined.
387 # It also installs some standard documentation files (AUTHORS, Change*, CHANGELOG, CONTRIBUTORS,
388 # KNOWN_BUGS, MAINTAINERS, NEWS, README*, TODO).
389 distutils_src_install() {
390 if [[ "${EBUILD_PHASE}" != "install" ]]; then
391 die "${FUNCNAME}() can be used only in src_install() phase"
394 _python_check_python_pkg_setup_execution
395 _python_initialize_prefix_variables
396 _python_set_color_variables
398 local default_docs doc line nspkg_pth_file nspkg_pth_files=() setup_file
400 if _python_package_supporting_installation_for_multiple_python_abis; then
401 distutils_installation() {
404 _distutils_prepare_global_options
406 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
407 _distutils_prepare_current_working_directory "${setup_file}"
409 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}
410 "$(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 "$?"
412 _distutils_restore_current_working_directory "${setup_file}"
417 python_execute_function ${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES:+-s} distutils_installation "$@"
418 unset -f distutils_installation
420 python_merge_intermediate_installation_images "${T}/images"
422 # Mark the package to be rebuilt after a Python upgrade.
425 _distutils_prepare_global_options
427 for setup_file in "${DISTUTILS_SETUP_FILES[@]-setup.py}"; do
428 _distutils_prepare_current_working_directory "${setup_file}"
430 echo ${_BOLD}"$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@"${_NORMAL}
431 "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" || die "Installation failed"
433 _distutils_restore_current_working_directory "${setup_file}"
437 while read -d $'\0' -r nspkg_pth_file; do
438 nspkg_pth_files+=("${nspkg_pth_file}")
439 done < <(find "${ED}" -name "*-nspkg.pth" -type f -print0)
441 if [[ "${#nspkg_pth_files[@]}" -gt 0 ]]; then
443 einfo "Python namespaces:"
444 for nspkg_pth_file in "${nspkg_pth_files[@]}"; do
445 einfo " '${nspkg_pth_file#${ED%/}}':"
446 while read -r line; do
447 einfo " $(echo "${line}" | sed -e "s/.*types\.ModuleType('\([^']\+\)').*/\1/")"
448 done < "${nspkg_pth_file}"
449 #if ! has "${EAPI:-0}" 0 1 2 3; then
450 # rm -f "${nspkg_pth_file}" || die "Deletion of '${nspkg_pth_file}' failed"
456 if [[ -e "${ED}usr/local" ]]; then
457 die "Illegal installation into /usr/local"
460 default_docs="AUTHORS Change* CHANGELOG CONTRIBUTORS KNOWN_BUGS MAINTAINERS NEWS README* TODO"
462 for doc in ${default_docs}; do
463 [[ -s "${doc}" ]] && dodoc "${doc}"
466 if has "${EAPI:-0}" 0 1 2 3; then
467 if [[ -n "${DOCS}" ]]; then
468 dodoc ${DOCS} || die "dodoc failed"
471 if [[ -n "${DOCS}" ]]; then
472 dodoc -r ${DOCS} || die "dodoc failed"
476 DISTUTILS_SRC_INSTALL_EXECUTED="1"
479 # @FUNCTION: distutils_pkg_postinst
481 # The distutils pkg_postinst function. This function is exported.
482 # When PYTHON_MODNAME variable is set, then this function calls python_mod_optimize() with modules
483 # specified in PYTHON_MODNAME variable. Otherwise it calls python_mod_optimize() with module, whose
484 # name is equal to name of current package, if this module exists.
485 distutils_pkg_postinst() {
486 if [[ "${EBUILD_PHASE}" != "postinst" ]]; then
487 die "${FUNCNAME}() can be used only in pkg_postinst() phase"
490 _python_check_python_pkg_setup_execution
491 _python_initialize_prefix_variables
493 if [[ -z "${DISTUTILS_SRC_INSTALL_EXECUTED}" ]]; then
494 die "${FUNCNAME}() called illegally"
499 if [[ "$#" -ne 0 ]]; then
500 die "${FUNCNAME}() does not accept arguments"
503 if [[ -z "$(declare -p PYTHON_MODNAME 2> /dev/null)" ]]; then
504 for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"usr/share/jython-*/Lib; do
505 if [[ -d "${pylibdir}/site-packages/${PN}" ]]; then
506 PYTHON_MODNAME="${PN}"
511 if [[ -n "${PYTHON_MODNAME}" ]]; then
512 if ! has "${EAPI:-0}" 0 1 2 || _python_package_supporting_installation_for_multiple_python_abis; then
513 python_mod_optimize ${PYTHON_MODNAME}
515 for pymod in ${PYTHON_MODNAME}; do
516 python_mod_optimize "$(python_get_sitedir)/${pymod}"
522 # @FUNCTION: distutils_pkg_postrm
524 # The distutils pkg_postrm function. This function is exported.
525 # When PYTHON_MODNAME variable is set, then this function calls python_mod_cleanup() with modules
526 # specified in PYTHON_MODNAME variable. Otherwise it calls python_mod_cleanup() with module, whose
527 # name is equal to name of current package, if this module exists.
528 distutils_pkg_postrm() {
529 if [[ "${EBUILD_PHASE}" != "postrm" ]]; then
530 die "${FUNCNAME}() can be used only in pkg_postrm() phase"
533 _python_check_python_pkg_setup_execution
534 _python_initialize_prefix_variables
536 if [[ -z "${DISTUTILS_SRC_INSTALL_EXECUTED}" ]]; then
537 die "${FUNCNAME}() called illegally"
542 if [[ "$#" -ne 0 ]]; then
543 die "${FUNCNAME}() does not accept arguments"
546 if [[ -z "$(declare -p PYTHON_MODNAME 2> /dev/null)" ]]; then
547 for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"usr/share/jython-*/Lib; do
548 if [[ -d "${pylibdir}/site-packages/${PN}" ]]; then
549 PYTHON_MODNAME="${PN}"
554 if [[ -n "${PYTHON_MODNAME}" ]]; then
555 if ! has "${EAPI:-0}" 0 1 2 || _python_package_supporting_installation_for_multiple_python_abis; then
556 python_mod_cleanup ${PYTHON_MODNAME}
558 for pymod in ${PYTHON_MODNAME}; do
559 for pylibdir in "${EROOT}"usr/$(get_libdir)/python*; do
560 if [[ -d "${pylibdir}/site-packages/${pymod}" ]]; then
561 python_mod_cleanup "${pylibdir#${EROOT%/}}/site-packages/${pymod}"
569 # @FUNCTION: distutils_get_intermediate_installation_image
571 # Print path to intermediate installation image.
573 # This function can be used only in distutils_src_install_pre_hook() and distutils_src_install_post_hook().
574 distutils_get_intermediate_installation_image() {
575 if [[ "${EBUILD_PHASE}" != "install" ]]; then
576 die "${FUNCNAME}() can be used only in src_install() phase"
579 if ! _python_package_supporting_installation_for_multiple_python_abis; then
580 die "${FUNCNAME}() cannot be used in ebuilds of packages not supporting installation for multiple Python ABIs"
583 _python_check_python_pkg_setup_execution
585 if [[ ! "${FUNCNAME[1]}" =~ ^distutils_src_install_(pre|post)_hook$ ]]; then
586 die "${FUNCNAME}() can be used only in distutils_src_install_pre_hook() and distutils_src_install_post_hook()"
589 if [[ "$#" -ne 0 ]]; then
590 die "${FUNCNAME}() does not accept arguments"
593 echo "${T}/images/${PYTHON_ABI}"