Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 1/5] distutils-r1.eclass: Require meson-python >= 0.11.0
Date: Thu, 08 Dec 2022 18:54:18
Message-Id: 20221208185348.3599822-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/5] distutils-r1 & python-utils-r1: cleanup old stuff by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/distutils-r1.eclass | 43 +++++++++++++++++---------------------
4 1 file changed, 19 insertions(+), 24 deletions(-)
5
6 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
7 index 97c5e562bc0f..65004ba856f9 100644
8 --- a/eclass/distutils-r1.eclass
9 +++ b/eclass/distutils-r1.eclass
10 @@ -236,7 +236,7 @@ _distutils_set_globals() {
11 ;;
12 meson-python)
13 bdep+='
14 - >=dev-python/meson-python-0.10.0-r1[${PYTHON_USEDEP}]
15 + >=dev-python/meson-python-0.11.0[${PYTHON_USEDEP}]
16 '
17 ;;
18 pbr)
19 @@ -1312,29 +1312,24 @@ distutils_pep517_install() {
20 local config_settings=
21 case ${DISTUTILS_USE_PEP517} in
22 meson-python)
23 - # TODO: remove the condition once we BDEP on >=0.11
24 - if has_version -b ">=dev-python/meson-python-0.11"; then
25 - local -x NINJAOPTS=$(get_NINJAOPTS)
26 - config_settings=$(
27 - "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
28 - import json
29 - import os
30 - import shlex
31 - import sys
32 -
33 - ninjaopts = shlex.split(os.environ["NINJAOPTS"])
34 - print(json.dumps({
35 - "setup-args": sys.argv[1:],
36 - "compile-args": [
37 - "-v",
38 - f"--ninja-args={ninjaopts!r}",
39 - ],
40 - }))
41 - EOF
42 - )
43 - elif [[ -n ${DISTUTILS_ARGS[@]} ]]; then
44 - die "DISTUTILS_ARGS requires >=dev-python/meson-python-0.11 (missing BDEP?)"
45 - fi
46 + local -x NINJAOPTS=$(get_NINJAOPTS)
47 + config_settings=$(
48 + "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
49 + import json
50 + import os
51 + import shlex
52 + import sys
53 +
54 + ninjaopts = shlex.split(os.environ["NINJAOPTS"])
55 + print(json.dumps({
56 + "setup-args": sys.argv[1:],
57 + "compile-args": [
58 + "-v",
59 + f"--ninja-args={ninjaopts!r}",
60 + ],
61 + }))
62 + EOF
63 + )
64 ;;
65 setuptools)
66 if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
67 --
68 2.38.1