Skip to content

Commit

Permalink
eclass/python-utils-r1: sync with gx86
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
  • Loading branch information
grobian committed May 8, 2024
1 parent 0cef2e3 commit 65650e5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions eclass/python-utils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inherit multiprocessing toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3
python3_{10..12}
python3_{10..13}
)
readonly _PYTHON_ALL_IMPLS

Expand Down Expand Up @@ -80,7 +80,7 @@ _python_verify_patterns() {
local impl pattern
for pattern; do
case ${pattern} in
-[23]|3.[89]|3.1[012])
-[23]|3.[89]|3.1[0-3])
continue
;;
esac
Expand Down Expand Up @@ -136,7 +136,7 @@ _python_set_impls() {
# please keep them in sync with _PYTHON_ALL_IMPLS
# and _PYTHON_HISTORICAL_IMPLS
case ${i} in
pypy3|python3_9|python3_1[0-2])
pypy3|python3_9|python3_1[0-3])
;;
jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-7]|python3_[1-9])
obsolete+=( "${i}" )
Expand Down Expand Up @@ -231,7 +231,7 @@ _python_impl_matches() {
[[ ${impl} == python${pattern/./_} || ${impl} == pypy3 ]] &&
return 0
;;
3.8|3.9|3.1[1-2])
3.8|3.9|3.1[1-3])
[[ ${impl} == python${pattern/./_} ]] && return 0
;;
*)
Expand Down Expand Up @@ -900,7 +900,7 @@ python_doheader() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'

local includedir=$(python_get_includedir)
local d=${includedir#${EPREFIX}}
local d=${includedir#${ESYSROOT}}

(
insopts -m 0644
Expand Down Expand Up @@ -1102,7 +1102,7 @@ python_fix_shebang() {
if [[ ! ${error} ]]; then
debug-print "${FUNCNAME}: in file ${f#${D%/}}"
debug-print "${FUNCNAME}: rewriting shebang: ${shebang}"
sed -i -e "1s@${from}@#!${PYTHON}@" "${f}" || die
sed -i -e "1s@${from}@#!${EPREFIX}/usr/bin/${EPYTHON}@" "${f}" || die
any_fixed=1
else
eerror "The file has incompatible shebang:"
Expand Down Expand Up @@ -1365,6 +1365,9 @@ epytest() {
# override filterwarnings=error, we do not really want -Werror
# for end users, as it tends to fail on new warnings from deps
-Wdefault
# however, do error out if the package failed to load
# an appropriate async plugin
-Werror::pytest.PytestUnhandledCoroutineWarning
# override color output
"--color=${color}"
# count is more precise when we're dealing with a large number
Expand Down

0 comments on commit 65650e5

Please sign in to comment.