local die_args=()
[[ ${EAPI} != [45] ]] && die_args+=( -n )
+ [[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg
+
set -- "${PYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}"
echo "${@}" >&2
- "${@}" || die "${die_args[@]}" || return ${?}
+ "${@}" || die "${die_args[@]}"
+ local ret=${?}
+
+ if [[ ${BUILD_DIR} ]]; then
+ rm "${HOME}"/.pydistutils.cfg || die "${die_args[@]}"
+ fi
+
+ return ${ret}
}
# @FUNCTION: distutils_install_for_testing
distutils-r1_python_compile() {
debug-print-function ${FUNCNAME} "${@}"
- _distutils-r1_create_setup_cfg
_distutils-r1_copy_egg_info
esetup.py build "${@}"
# enable compilation for the install phase.
local -x PYTHONDONTWRITEBYTECODE=
- # re-create setup.cfg with install paths
- _distutils-r1_create_setup_cfg
-
# python likes to compile any module it sees, which triggers sandbox
# failures if some packages haven't compiled their modules yet.
addpredict "${EPREFIX}/usr/$(get_libdir)/${EPYTHON}"