mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-07 05:57:07 -08:00
python-utils-r1.eclass: Add function to run python_check_deps()
Add a function encompassing the common logic to run python_check_deps() from python-any-r1 and python-r1. Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1368,5 +1368,25 @@ eunittest() {
|
||||
return ${?}
|
||||
}
|
||||
|
||||
# @FUNCTION: _python_run_check_deps
|
||||
# @INTERNAL
|
||||
# @USAGE: <impl>
|
||||
# @DESCRIPTION:
|
||||
# Verify whether <impl> is an acceptable choice to run any-r1 style
|
||||
# code. Checks whether the interpreter is installed, runs
|
||||
# python_check_deps() if declared.
|
||||
_python_run_check_deps() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local impl=${1}
|
||||
|
||||
python_is_installed "${impl}" || return 1
|
||||
declare -f python_check_deps >/dev/null || return 0
|
||||
|
||||
local PYTHON_USEDEP="python_targets_${impl}(-)"
|
||||
local PYTHON_SINGLE_USEDEP="python_single_target_${impl}(-)"
|
||||
python_check_deps
|
||||
}
|
||||
|
||||
_PYTHON_UTILS_R1=1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user