meson: Support for both packaging and distutils
authorYonggang Luo <luoyonggang@gmail.com>
Mon, 18 Dec 2023 10:16:47 +0000 (18:16 +0800)
committerEric Engestrom <eric@engestrom.ch>
Tue, 2 Jan 2024 16:20:17 +0000 (16:20 +0000)
commit92cdf6cb5f25f632350d8ca0d9451b0e87194ca3
treeb1c6f326067200fd779a55d1c6820adcd8454f4f
parent0b44ec8648a8962ef7f084f5c61a5c7ce7f0aeb0
meson: Support for both packaging and distutils

distutils was deprecated and is now gone on modern systems.
so the default behavior is to use the supported thing, which is packaging.version, and when on an old system, fallback to the old distutils.version.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9943

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26746>
(cherry picked from commit 670a799ebff9a98daafccf49324c2a01311b0c41)
.pick_status.json
meson.build