@@ -7,15 +7,10 @@ project(
77 ' python.install_env=auto'
88 ]
99)
10- completions = dependency (' bash-completion' )
11- systemd = dependency (' systemd' )
1210system = host_machine .system()
1311sysconfdir = get_option (' sysconfdir' )
1412INIT_SYSTEM = get_option (' init_system' )
15- VALID_INIT_SYSTEMS = [
16- ' systemd' , ' sysvinit' , ' sysvinit_deb' , ' sysvinit_dragonfly' ,
17- ' sysvinit_freebsd' , ' sysvinit_netbsd' , ' sysvinit_openbsd'
18- ]
13+ VALID_INIT_SYSTEMS = [' systemd' ]
1914if not VALID_INIT_SYSTEMS.contains(INIT_SYSTEM)
2015 error (
2116 ' Invalid init_system supplied: "@0@". Must be one of: @1@' .format(
@@ -24,6 +19,7 @@ if not VALID_INIT_SYSTEMS.contains(INIT_SYSTEM)
2419endif
2520
2621
22+
2723lib_exec_dir = join_paths (' /usr' , get_option (' libexecdir' ), ' cloud-init' )
2824
2925pymod = import (' python' )
@@ -39,14 +35,19 @@ install_subdir(
3935)
4036
4137# Binaries and script entrypoints
42- bash_completions_dir = completions.get_variable (
43- pkgconfig : ' completionsdir' ,
44- default_value : ' /etc/bash_completion.d'
45- )
46- install_data (
47- ' bash_completion/cloud-init' ,
48- install_dir : bash_completions_dir, install_tag : ' scripts'
49- )
38+ readthedocs = get_option (' readthedocs_build' )
39+ if not readthedocs
40+ completions = dependency (' bash-completion' )
41+ bash_completions_dir = completions.get_variable (
42+ pkgconfig : ' completionsdir' ,
43+ default_value : ' /etc/bash_completion.d'
44+ )
45+ install_data (
46+ ' bash_completion/cloud-init' ,
47+ install_dir : bash_completions_dir,
48+ install_tag : ' scripts'
49+ )
50+ endif
5051
5152install_data (
5253 [' tools/ds-identify' , ' tools/hook-hotplug' ,' tools/uncloud-init' , ' tools/write-ssh-key-fingerprints' ],
@@ -81,6 +82,7 @@ install_data(
8182)
8283
8384if INIT_SYSTEM == ' systemd'
85+ systemd = dependency (' systemd' )
8486 udev = dependency (' udev' )
8587 systemd_unit_dir = systemd.get_variable (pkgconfig : ' systemdsystemunitdir' )
8688 systemd_generator_dir = systemd.get_variable (
0 commit comments