mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
add user setable version using configure
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@czarc.net>
This commit is contained in:
parent
ad3f69e12d
commit
fd8420ef1b
3
setup.py
3
setup.py
@ -221,6 +221,7 @@ class my_rpm(Command):
|
|||||||
|
|
||||||
class configure(Command):
|
class configure(Command):
|
||||||
user_options = [
|
user_options = [
|
||||||
|
("pkgversion=", None, "user specified version-id"),
|
||||||
("prefix=", None, "installation prefix"),
|
("prefix=", None, "installation prefix"),
|
||||||
("without-tui", None, "don't install virt-manager-tui"),
|
("without-tui", None, "don't install virt-manager-tui"),
|
||||||
("qemu-user=", None,
|
("qemu-user=", None,
|
||||||
@ -256,12 +257,14 @@ class configure(Command):
|
|||||||
self.preferred_distros = ""
|
self.preferred_distros = ""
|
||||||
self.default_graphics = "vnc"
|
self.default_graphics = "vnc"
|
||||||
self.prefix = sysprefix
|
self.prefix = sysprefix
|
||||||
|
self.pkgversion = ""
|
||||||
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
template = ""
|
template = ""
|
||||||
template += "[config]\n"
|
template += "[config]\n"
|
||||||
template += "prefix = %s\n" % self.prefix
|
template += "prefix = %s\n" % self.prefix
|
||||||
|
template += "pkgversion = %s\n" % self.pkgversion
|
||||||
template += "with_tui = %s\n" % int(not self.without_tui)
|
template += "with_tui = %s\n" % int(not self.without_tui)
|
||||||
template += "default_qemu_user = %s\n" % self.qemu_user
|
template += "default_qemu_user = %s\n" % self.qemu_user
|
||||||
template += "libvirt_packages = %s\n" % self.libvirt_package_names
|
template += "libvirt_packages = %s\n" % self.libvirt_package_names
|
||||||
|
@ -44,6 +44,9 @@ def _get_param(name, default):
|
|||||||
|
|
||||||
__version__ = "0.9.100"
|
__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
|
# We should map this into the config somehow but I question if anyone cares
|
||||||
prefix = _get_param("prefix", "/usr")
|
prefix = _get_param("prefix", "/usr")
|
||||||
|
Loading…
Reference in New Issue
Block a user