diff --git a/setup.py b/setup.py index f8ad2905b..167caf67c 100644 --- a/setup.py +++ b/setup.py @@ -221,6 +221,7 @@ class my_rpm(Command): class configure(Command): user_options = [ + ("pkgversion=", None, "user specified version-id"), ("prefix=", None, "installation prefix"), ("without-tui", None, "don't install virt-manager-tui"), ("qemu-user=", None, @@ -256,12 +257,14 @@ class configure(Command): self.preferred_distros = "" self.default_graphics = "vnc" self.prefix = sysprefix + self.pkgversion = "" def run(self): template = "" template += "[config]\n" template += "prefix = %s\n" % self.prefix + template += "pkgversion = %s\n" % self.pkgversion template += "with_tui = %s\n" % int(not self.without_tui) template += "default_qemu_user = %s\n" % self.qemu_user template += "libvirt_packages = %s\n" % self.libvirt_package_names diff --git a/virtcli/cliconfig.py b/virtcli/cliconfig.py index 1290e9087..6b2660f1c 100644 --- a/virtcli/cliconfig.py +++ b/virtcli/cliconfig.py @@ -44,6 +44,9 @@ def _get_param(name, default): __version__ = "0.9.100" +_usr_version = _get_param("pkgversion", "") +if _usr_version is not None and _usr_version != "": + __version__ = _usr_version # We should map this into the config somehow but I question if anyone cares prefix = _get_param("prefix", "/usr")