--- gx86/eclass/python-r1.eclass | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass index 45ed0cb..b059a3b 100644 --- a/gx86/eclass/python-r1.eclass +++ b/gx86/eclass/python-r1.eclass @@ -283,6 +283,52 @@ python_export() { done } +# @FUNCTION: python_get_PYTHON +# @USAGE: [<impl>] +# @DESCRIPTION: +# Obtain and print the path to the Python interpreter for the given +# implementation. If no implementation is provided, ${EPYTHON} will +# be used. +# +# If you just need to have PYTHON set (and exported), then it is better +# to use python_export() directly instead. +python_get_PYTHON() { + debug-print-function ${FUNCNAME} "${@}" + + python_export "${@}" PYTHON + echo "${PYTHON}" +} + +# @FUNCTION: python_get_EPYTHON +# @USAGE: <impl> +# @DESCRIPTION: +# Obtain and print the EPYTHON value for the given implementation. +# +# If you just need to have EPYTHON set (and exported), then it is better +# to use python_export() directly instead. +python_get_EPYTHON() { + debug-print-function ${FUNCNAME} "${@}" + + python_export "${@}" EPYTHON + echo "${EPYTHON}" +} + +# @FUNCTION: python_get_sitedir +# @USAGE: [<impl>] +# @DESCRIPTION: +# Obtain and print the 'site-packages' path for the given +# implementation. If no implementation is provided, ${EPYTHON} will +# be used. +# +# If you just need to have PYTHON_SITEDIR set (and exported), then it is +# better to use python_export() directly instead. +python_get_sitedir() { + debug-print-function ${FUNCNAME} "${@}" + + python_export "${@}" PYTHON_SITEDIR + echo "${PYTHON_SITEDIR}" +} + # @FUNCTION: python_copy_sources # @DESCRIPTION: # Create a single copy of the package sources (${S}) for each enabled -- 1.7.12.4