mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 00:16:59 +02:00
eclass/python-single-r1: Sync with Gentoo
It's from Gentoo commit 3d67b1ccfacc37308a7236625035dff1156b025c.
This commit is contained in:
parent
179cb46a1d
commit
f65ddb0fa4
@ -7,7 +7,7 @@
|
|||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Author: Michał Górny <mgorny@gentoo.org>
|
# Author: Michał Górny <mgorny@gentoo.org>
|
||||||
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
|
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
|
||||||
# @SUPPORTED_EAPIS: 6 7 8
|
# @SUPPORTED_EAPIS: 7 8
|
||||||
# @PROVIDES: python-utils-r1
|
# @PROVIDES: python-utils-r1
|
||||||
# @BLURB: An eclass for Python packages not installed for multiple implementations.
|
# @BLURB: An eclass for Python packages not installed for multiple implementations.
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -37,31 +37,22 @@
|
|||||||
# For more information, please see the Python Guide:
|
# For more information, please see the Python Guide:
|
||||||
# https://projects.gentoo.org/python/guide/
|
# https://projects.gentoo.org/python/guide/
|
||||||
|
|
||||||
case "${EAPI:-0}" in
|
case ${EAPI} in
|
||||||
[0-5])
|
7|8) ;;
|
||||||
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
;;
|
|
||||||
[6-8])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
|
if [[ ! ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
|
||||||
|
_PYTHON_SINGLE_R1_ECLASS=1
|
||||||
|
|
||||||
if [[ ${_PYTHON_R1} ]]; then
|
if [[ ${_PYTHON_R1_ECLASS} ]]; then
|
||||||
die 'python-single-r1.eclass can not be used with python-r1.eclass.'
|
die 'python-single-r1.eclass can not be used with python-r1.eclass.'
|
||||||
elif [[ ${_PYTHON_ANY_R1} ]]; then
|
elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
|
||||||
die 'python-single-r1.eclass can not be used with python-any-r1.eclass.'
|
die 'python-single-r1.eclass can not be used with python-any-r1.eclass.'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inherit python-utils-r1
|
inherit python-utils-r1
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_setup
|
|
||||||
|
|
||||||
# @ECLASS_VARIABLE: PYTHON_COMPAT
|
# @ECLASS_VARIABLE: PYTHON_COMPAT
|
||||||
# @REQUIRED
|
# @REQUIRED
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -257,8 +248,6 @@ _python_single_set_globals() {
|
|||||||
_python_single_set_globals
|
_python_single_set_globals
|
||||||
unset -f _python_single_set_globals
|
unset -f _python_single_set_globals
|
||||||
|
|
||||||
if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
|
|
||||||
|
|
||||||
# @FUNCTION: python_gen_useflags
|
# @FUNCTION: python_gen_useflags
|
||||||
# @USAGE: [<pattern>...]
|
# @USAGE: [<pattern>...]
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -463,5 +452,6 @@ python-single-r1_pkg_setup() {
|
|||||||
[[ ${MERGE_TYPE} != binary ]] && python_setup
|
[[ ${MERGE_TYPE} != binary ]] && python_setup
|
||||||
}
|
}
|
||||||
|
|
||||||
_PYTHON_SINGLE_R1=1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS pkg_setup
|
||||||
|
Loading…
Reference in New Issue
Block a user