[python-swiftclient] Update to upstream release 1.5.0.

Jakub Ruzicka jruzicka at fedoraproject.org
Tue Jul 23 16:08:36 UTC 2013


commit 702870d7a208aaac0661bcb6639a5302fb56b0be
Author: Jakub Ruzicka <jruzicka at redhat.com>
Date:   Mon Jul 22 19:53:43 2013 +0200

    Update to upstream release 1.5.0.
    
    Changelog:
    - Update to upstream 1.5.0 release.
    - Add new build requires: python-pbr, python-d2to1.
    - Remove runtime dependency on python-pbr.

 .gitignore                                         |    1 +
 0001-Remove-runtime-dependency-on-python-pbr.patch |   35 ++++++++++++++++++++
 python-swiftclient.spec                            |   24 ++++++++++---
 sources                                            |    2 +-
 4 files changed, 55 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 487a635..2ac3b69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /python-swiftclient-1.2.0.tar.gz
 /python-swiftclient-1.3.0.tar.gz
 /python-swiftclient-1.4.0.tar.gz
+/python-swiftclient-1.5.0.tar.gz
diff --git a/0001-Remove-runtime-dependency-on-python-pbr.patch b/0001-Remove-runtime-dependency-on-python-pbr.patch
new file mode 100644
index 0000000..0795676
--- /dev/null
+++ b/0001-Remove-runtime-dependency-on-python-pbr.patch
@@ -0,0 +1,35 @@
+From af09bae37223f4c6e990f5e3badee502229ca101 Mon Sep 17 00:00:00 2001
+From: Jakub Ruzicka <jruzicka at redhat.com>
+Date: Tue, 23 Jul 2013 16:28:21 +0200
+Subject: [PATCH] Remove runtime dependency on python-pbr.
+
+---
+ swiftclient/version.py | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/swiftclient/version.py b/swiftclient/version.py
+index 7bb5d18..bb908b8 100644
+--- a/swiftclient/version.py
++++ b/swiftclient/version.py
+@@ -14,6 +14,19 @@
+ #    License for the specific language governing permissions and limitations
+ #    under the License.
+ 
+-from pbr import version as pbr_version
++class VersionInfo(object):
++    """
++    Emulate pbr VersionInfo to get rid of runtime dependency on python-pbr.
++    """
++    version = "REDHATSWIFTCLIENTVERSION"
+ 
+-version_info = pbr_version.VersionInfo('python-swiftclient')
++    def release_string(self):
++        return self.version
++
++    def version_string(self):
++        return self.version
++
++    def cached_version_string(self, prefix=""):
++        return "%s%s" % (prefix, self.version)
++
++version_info = VersionInfo()
diff --git a/python-swiftclient.spec b/python-swiftclient.spec
index 8baa207..b20e6dc 100644
--- a/python-swiftclient.spec
+++ b/python-swiftclient.spec
@@ -1,5 +1,5 @@
 Name:       python-swiftclient
-Version:    1.4.0
+Version:    1.5.0
 Release:    1%{?dist}
 Summary:    Client Library for OpenStack Object Storage API
 License:    ASL 2.0
@@ -7,8 +7,9 @@ URL:        http://pypi.python.org/pypi/%{name}
 Source0:    http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
 
 #
-# patches_base=1.4.0
+# patches_base=1.5.0
 #
+Patch0001: 0001-Remove-runtime-dependency-on-python-pbr.patch
 
 BuildArch:  noarch
 Requires:   python-simplejson
@@ -17,6 +18,8 @@ Conflicts:  swift < 2.0-0.3
 
 BuildRequires: python2-devel
 BuildRequires: python-setuptools
+BuildRequires: python-d2to1
+BuildRequires: python-pbr
 
 %description
 Client library and command line utility for interacting with Openstack
@@ -34,10 +37,17 @@ Object Storage API.
 
 %prep
 %setup -q
+
+%patch0001 -p1
+
+# We provide version like this in order to remove runtime dep on pbr.
+sed -i s/REDHATSWIFTCLIENTVERSION/%{version}/ swiftclient/version.py
+
 # Remove bundled egg-info
 rm -rf python_swiftclient.egg-info
 # let RPM handle deps
-sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
+: > requirements.txt
+: > test-requirements.txt
 
 %build
 %{__python} setup.py build
@@ -45,9 +55,6 @@ sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
 %install
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
-# Delete tests
-rm -fr %{buildroot}%{python_sitelib}/tests
-
 export PYTHONPATH="$( pwd ):$PYTHONPATH"
 pushd doc
 make html
@@ -65,6 +72,11 @@ rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
 %doc LICENSE doc/build/html
 
 %changelog
+* Mon Jul 22 2013 Jakub Ruzicka <jruzicka at redhat.com> 1.5.0-1
+- Update to upstream 1.5.0 release.
+- Add new build requires: python-pbr, python-d2to1.
+- Remove runtime dependency on python-pbr.
+
 * Mon May 13 2013 Jakub Ruzicka <jruzicka at redhat.com> 1.4.0-1
 - Update to upstream 1.4.0 release.
 
diff --git a/sources b/sources
index 11b8322..99b8aff 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3767442551361cffdbb3681e401cea52  python-swiftclient-1.4.0.tar.gz
+717ade4e91c0f5372f6fa6d545e7bab7  python-swiftclient-1.5.0.tar.gz


More information about the scm-commits mailing list