[openstack-glance/el6-havana] Remove runtime dep on python pbr

John Bresnahan buzztroll at fedoraproject.org
Tue Sep 10 02:41:23 UTC 2013


commit a5defd02e6acdb10a9778d2a78892ea161e79e65
Author: John Bresnahan <jbresnah at redhat.com>
Date:   Mon Sep 9 16:29:11 2013 -1000

    Remove runtime dep on python pbr

 0005-Remove-runtime-dep-on-python-pbr.patch |   47 +++++++++++++++++++++++++++
 openstack-glance.spec                       |   10 ++++++
 2 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/0005-Remove-runtime-dep-on-python-pbr.patch b/0005-Remove-runtime-dep-on-python-pbr.patch
new file mode 100644
index 0000000..a932c6e
--- /dev/null
+++ b/0005-Remove-runtime-dep-on-python-pbr.patch
@@ -0,0 +1,47 @@
+From e53ff3df70700ad9e2f7c5fcd3a79626aea70d9b Mon Sep 17 00:00:00 2001
+From: John Bresnahan <jbresnah at redhat.com>
+Date: Mon, 9 Sep 2013 16:28:29 -1000
+Subject: [PATCH] Remove runtime dep on python pbr
+
+---
+ glance/version.py | 28 ++++++++++++++++++++++++++--
+ 1 file changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/glance/version.py b/glance/version.py
+index d815183..861e104 100644
+--- a/glance/version.py
++++ b/glance/version.py
+@@ -14,7 +14,31 @@
+ #    License for the specific language governing permissions and limitations
+ #    under the License.
+ 
++GLANCE_VENDOR = "OpenStack Foundation"
++GLANCE_PRODUCT = "OpenStack Glance"
++GLANCE_PACKAGE = None  # OS distro package version suffix
+ 
+-import pbr.version
++loaded = False
+ 
+-version_info = pbr.version.VersionInfo('glance')
++
++class VersionInfo(object):
++    release = "REDHATGLANCERELEASE"
++    version = "REDHATGLANCEVERSION"
++
++    def version_string(self):
++        return self.version
++
++    def cached_version_string(self):
++        return self.version
++
++    def release_string(self):
++        return self.release
++
++    def canonical_version_string(self):
++        return self.version
++
++    def version_string_with_vcs(self):
++        return self.release
++
++
++version_info = VersionInfo()
diff --git a/openstack-glance.spec b/openstack-glance.spec
index d90094d..66e5698 100644
--- a/openstack-glance.spec
+++ b/openstack-glance.spec
@@ -22,6 +22,7 @@ Patch0001: 0001-Don-t-access-the-net-while-building-docs.patch
 Patch0002: 0002-Use-updated-parallel-install-versions-of-epel-packag.patch
 Patch0003: 0003-avoid-the-uneeded-dependency-on-Crypto.Random.patch
 Patch0004: 0004-Avoid-NULLs-in-crypto-padding.patch
+Patch0005: 0005-Remove-runtime-dep-on-python-pbr.patch
 
 BuildArch:        noarch
 BuildRequires:    python2-devel
@@ -32,6 +33,7 @@ BuildRequires:    python-paste-deploy1.5
 BuildRequires:    python-routes1.12
 BuildRequires:    python-sqlalchemy0.7
 BuildRequires:    python-webob1.0
+BuildRequires:    python-pbr
 
 Requires(post):   chkconfig
 Requires(preun):  initscripts
@@ -112,6 +114,7 @@ sed -i 's/%{version}.b3/%{version}/' PKG-INFO
 %patch0002 -p1
 %patch0003 -p1
 %patch0004 -p1
+%patch0005 -p1
 
 
 # Remove bundled egg-info
@@ -120,6 +123,10 @@ sed -i '/\/usr\/bin\/env python/d' glance/common/config.py glance/common/crypt.p
 # versioninfo is missing in f3 tarball
 echo %{version} > glance/versioninfo
 
+sed -i '/setuptools_git/d' setup.py
+sed -i s/REDHATGLANCEVERSION/%{version}/ glance/version.py
+sed -i s/REDHATGLANCERELEASE/%{release}/ glance/version.py
+
 # Remove the requirements file so that pbr hooks don't add it
 # to distutils requiers_dist config
 rm -rf {test-,}requirements.txt tools/{pip,test}-requires
@@ -302,6 +309,9 @@ fi
 
 %changelog
 * Mon Sep  9 2013 John Bresnahan <jbresnah at redhat.com> 2013.2.b3
+- Remove runtime dep on python pbr
+
+* Mon Sep  9 2013 John Bresnahan <jbresnah at redhat.com> 2013.2.b3
 - Update to 2013.2.b3
 
 * Tue Jul 23 2013 John Bresnahan <jbresnah at redhat.com> 2013.2-0.6.b2


More information about the scm-commits mailing list