Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
project(
'cloud-init',
version: '25.3',
meson_version: '>=0.63.0', # rockylinux/9
meson_version: '>=0.61.2', # Ubuntu 22.04 (Jammy)
license: 'GPL-3 OR Apache-2.0',
default_options: [
# The default can yield broken results.
'python.install_env=auto',
],
)
system = host_machine.system()
sysconfdir = get_option('sysconfdir')
Expand All @@ -32,14 +28,22 @@ install_subdir(

# Update packaged version strings
downstream_version = get_option('downstream_version')
configure_file(
meson_versions_py = configure_file(
input: 'meson_versions.py.in',
output: 'meson_versions.py',
configuration: {
'UPSTREAM_VERSION': meson.project_version(),
'DOWNSTREAM_VERSION': downstream_version, # Optional for packagers
},
install_dir: python.get_install_dir() / 'cloudinit',
)

# Explicitly install the generated meson_versions.py file
# Using install_data separately from configure_file for better compatibility
# with older meson versions (fixes version detection on Ubuntu 22.04/Jammy)
install_data(
meson_versions_py,
install_dir: python.get_install_dir() / 'cloudinit',
install_mode: 'rw-r--r--',
install_tag: 'python-runtime',
)

Expand Down