Skip to content

Commit

Permalink
distutils-r1.eclass: Require meson-python >= 0.11.0
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Dec 14, 2022
1 parent a4fe446 commit a109fee
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 deletions eclass/distutils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ _distutils_set_globals() {
;;
meson-python)
bdep+='
>=dev-python/meson-python-0.10.0-r1[${PYTHON_USEDEP}]
>=dev-python/meson-python-0.11.0[${PYTHON_USEDEP}]
'
;;
pbr)
Expand Down Expand Up @@ -1312,29 +1312,24 @@ distutils_pep517_install() {
local config_settings=
case ${DISTUTILS_USE_PEP517} in
meson-python)
# TODO: remove the condition once we BDEP on >=0.11
if has_version -b ">=dev-python/meson-python-0.11"; then
local -x NINJAOPTS=$(get_NINJAOPTS)
config_settings=$(
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
import json
import os
import shlex
import sys
ninjaopts = shlex.split(os.environ["NINJAOPTS"])
print(json.dumps({
"setup-args": sys.argv[1:],
"compile-args": [
"-v",
f"--ninja-args={ninjaopts!r}",
],
}))
EOF
)
elif [[ -n ${DISTUTILS_ARGS[@]} ]]; then
die "DISTUTILS_ARGS requires >=dev-python/meson-python-0.11 (missing BDEP?)"
fi
local -x NINJAOPTS=$(get_NINJAOPTS)
config_settings=$(
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
import json
import os
import shlex
import sys
ninjaopts = shlex.split(os.environ["NINJAOPTS"])
print(json.dumps({
"setup-args": sys.argv[1:],
"compile-args": [
"-v",
f"--ninja-args={ninjaopts!r}",
],
}))
EOF
)
;;
setuptools)
if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
Expand Down

0 comments on commit a109fee

Please sign in to comment.