1. update setup.py-configure to add keyword pkgversion 2. If pkgversion is specified in cli.cfg, update __version__ with its value. . Signed-off-by: Gene Czarcinski <gene@xxxxxxxxx> --- setup.py | 3 +++ virtcli/cliconfig.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/setup.py b/setup.py index 317f84d..aa712c2 100644 --- a/setup.py +++ b/setup.py @@ -218,6 +218,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, @@ -253,12 +254,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 9cf1629..06bc342 100644 --- a/virtcli/cliconfig.py +++ b/virtcli/cliconfig.py @@ -42,6 +42,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") -- 1.8.1.4 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list