[PATCH 1/6] meson: update to version 1.8.1

Paolo Bonzini posted 6 patches 5 months, 3 weeks ago
[PATCH 1/6] meson: update to version 1.8.1
Posted by Paolo Bonzini 5 months, 3 weeks ago
This adds several improvements to Rust support, including
native clippy and rustdoc targets, the "objects" keyword,
and running doctests.

Require it only when Rust support is requested, to avoid
putting a strict requirement on all build platforms for the
sake of an experimental feature.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                                  |   8 ++++++++
 python/scripts/vendor.py                   |   4 ++--
 python/wheels/meson-1.5.0-py3-none-any.whl | Bin 959846 -> 0 bytes
 python/wheels/meson-1.8.1-py3-none-any.whl | Bin 0 -> 1013001 bytes
 pythondeps.toml                            |   2 +-
 tests/lcitool/mappings.yml                 |   6 +++++-
 6 files changed, 16 insertions(+), 4 deletions(-)
 delete mode 100644 python/wheels/meson-1.5.0-py3-none-any.whl
 create mode 100644 python/wheels/meson-1.8.1-py3-none-any.whl

diff --git a/configure b/configure
index 2ce8d29fac2..74b3865e51e 100755
--- a/configure
+++ b/configure
@@ -1178,6 +1178,14 @@ fi
 ##########################################
 # detect rust triple
 
+meson_version=$($meson --version)
+if test "$rust" != disabled && ! version_ge "$meson_version" 1.8.1; then
+  if test "$rust" = enabled; then
+    error_exit "Rust support needs Meson 1.8.1 or newer"
+  fi
+  echo "Rust needs Meson 1.8.1, disabling" 2>&1
+  rust=disabled
+fi
 if test "$rust" != disabled && has "$rustc" && $rustc -vV > "${TMPDIR1}/${TMPB}.out"; then
   rust_host_triple=$(sed -n 's/^host: //p' "${TMPDIR1}/${TMPB}.out")
 else
diff --git a/python/scripts/vendor.py b/python/scripts/vendor.py
index 0405e910b48..b47db00743a 100755
--- a/python/scripts/vendor.py
+++ b/python/scripts/vendor.py
@@ -41,8 +41,8 @@ def main() -> int:
     parser.parse_args()
 
     packages = {
-        "meson==1.5.0":
-        "52b34f4903b882df52ad0d533146d4b992c018ea77399f825579737672ae7b20",
+        "meson==1.8.1":
+        "374bbf71247e629475fc10b0bd2ef66fc418c2d8f4890572f74de0f97d0d42da",
     }
 
     vendor_dir = Path(__file__, "..", "..", "wheels").resolve()
diff --git a/pythondeps.toml b/pythondeps.toml
index 7eaaa0fed10..7884ab521d1 100644
--- a/pythondeps.toml
+++ b/pythondeps.toml
@@ -19,7 +19,7 @@
 
 [meson]
 # The install key should match the version in python/wheels/
-meson = { accepted = ">=1.5.0", installed = "1.5.0", canary = "meson" }
+meson = { accepted = ">=1.5.0", installed = "1.8.1", canary = "meson" }
 pycotap = { accepted = ">=1.1.0", installed = "1.3.1" }
 
 [docs]
diff --git a/tests/lcitool/mappings.yml b/tests/lcitool/mappings.yml
index 673baf39367..8f0e95e1c56 100644
--- a/tests/lcitool/mappings.yml
+++ b/tests/lcitool/mappings.yml
@@ -8,6 +8,10 @@ mappings:
 
   meson:
     OpenSUSELeap15:
+    # Use Meson from PyPI wherever Rust is enabled
+    Debian:
+    Fedora:
+    Ubuntu:
 
   python3:
     OpenSUSELeap15: python311-base
@@ -72,7 +76,7 @@ mappings:
 pypi_mappings:
   # Request more recent version
   meson:
-    default: meson==1.5.0
+    default: meson==1.8.1
 
   # Drop packages that need devel headers
   python3-numpy:
-- 
2.49.0