From 62e7f1c521416aed788571e187b783a19e87ea97 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 17 Jul 2020 14:27:53 -0400 Subject: [PATCH] spec: Move virt-manager.spec.in -> virt-manager.spec Drop the VERSION templating. Tools today like packit and tito work best when a working .spec file exists. The extra burden is we need to update the version at release time, but that's no big deal Signed-off-by: Cole Robinson --- INSTALL.md | 3 +-- setup.py | 18 +----------------- virt-manager.spec.in => virt-manager.spec | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) rename virt-manager.spec.in => virt-manager.spec (99%) diff --git a/INSTALL.md b/INSTALL.md index a12320f62..d0a09bc56 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -25,8 +25,7 @@ To build an RPM, you can run: ## Pre-requisite software -A detailed dependency list can be found in -[virt-manager.spec.in](virt-manager.spec.in) file. +A detailed dependency list can be found in [virt-manager.spec](virt-manager.spec) file. Minimum version requirements of major components: diff --git a/setup.py b/setup.py index 9c4318f42..ad9324361 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ import distutils.command.build import distutils.command.install import distutils.command.install_data import distutils.command.install_egg_info -import distutils.command.sdist import distutils.dist import distutils.log import distutils.sysconfig @@ -283,20 +282,6 @@ class my_install_data(distutils.command.install_data.install_data): self.spawn(["glib-compile-schemas", gschema_install]) -class my_sdist(distutils.command.sdist.sdist): - description = "Update virt-manager.spec; build sdist-tarball." - - def run(self): - f1 = open('virt-manager.spec.in', 'r') - f2 = open('virt-manager.spec', 'w') - for line in f1: - f2.write(line.replace('@VERSION@', BuildConfig.version)) - f1.close() - f2.close() - - distutils.command.sdist.sdist.run(self) - - ################### # Custom commands # ################### @@ -394,7 +379,7 @@ class CheckPylint(distutils.core.Command): spellfiles += ["data/virt-manager.appdata.xml.in", "data/virt-manager.desktop.in", "data/org.virt-manager.virt-manager.gschema.xml", - "virt-manager.spec.in"] + "virt-manager.spec"] spellfiles.remove("NEWS.md") try: @@ -546,7 +531,6 @@ distutils.core.setup( 'build': my_build, 'build_i18n': my_build_i18n, - 'sdist': my_sdist, 'install': my_install, 'install_data': my_install_data, 'install_egg_info': my_egg_info, diff --git a/virt-manager.spec.in b/virt-manager.spec similarity index 99% rename from virt-manager.spec.in rename to virt-manager.spec index a442d5158..35592f2f1 100644 --- a/virt-manager.spec.in +++ b/virt-manager.spec @@ -7,7 +7,7 @@ # End local config Name: virt-manager -Version: @VERSION@ +Version: 2.2.1 Release: 1%{?dist} %global verrel %{version}-%{release}