mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
meson: add icons and schemas options
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
0f9d89e069
commit
54aadf0169
@ -40,6 +40,12 @@ foreach bin : bin_data
|
||||
)
|
||||
endforeach
|
||||
|
||||
gnome = import('gnome')
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: get_option('compile-schemas'),
|
||||
gtk_update_icon_cache: get_option('update-icon-cache'),
|
||||
)
|
||||
|
||||
if git
|
||||
spec_conf = configuration_data({
|
||||
'VERSION': meson.project_version(),
|
||||
|
2
meson_options.txt
Normal file
2
meson_options.txt
Normal file
@ -0,0 +1,2 @@
|
||||
option('update-icon-cache', type: 'boolean', value: true, description: 'whether to run gtk-update-icon-cache')
|
||||
option('compile-schemas', type: 'boolean', value: true, description: 'whether to compile gsettings schemas')
|
27
setup.py
27
setup.py
@ -80,20 +80,6 @@ class my_install(setuptools.command.install.install):
|
||||
|
||||
super().finalize_options()
|
||||
|
||||
def run(self):
|
||||
super().run()
|
||||
|
||||
if not self.distribution.no_update_icon_cache:
|
||||
print("running gtk-update-icon-cache")
|
||||
icon_path = os.path.join(self.install_data, "share/icons/hicolor")
|
||||
self.spawn(["gtk-update-icon-cache", "-q", "-t", icon_path])
|
||||
|
||||
if not self.distribution.no_compile_schemas:
|
||||
print("compiling gsettings schemas")
|
||||
gschema_install = os.path.join(self.install_data,
|
||||
"share/glib-2.0/schemas")
|
||||
self.spawn(["glib-compile-schemas", gschema_install])
|
||||
|
||||
|
||||
###################
|
||||
# Custom commands #
|
||||
@ -237,18 +223,6 @@ class CheckPylint(setuptools.Command):
|
||||
pylint.lint.Run(lintfiles + pylint_opts)
|
||||
|
||||
|
||||
class VMMDistribution(setuptools.dist.Distribution):
|
||||
global_options = setuptools.dist.Distribution.global_options + [
|
||||
("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
|
||||
("no-compile-schemas", None, "Don't compile gsettings schemas"),
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.no_update_icon_cache = False
|
||||
self.no_compile_schemas = False
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
name="virt-manager",
|
||||
version=BuildConfig.version,
|
||||
@ -274,6 +248,5 @@ setuptools.setup(
|
||||
'test': TestCommand,
|
||||
},
|
||||
|
||||
distclass=VMMDistribution,
|
||||
packages=[],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user