From 5c5170d23635295f69c233c1c5cfc297a3c17469 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Oct 09 2013 11:45:41 +0000 Subject: remove dependency on pbr --- diff --git a/0001-remove-requirement-on-pbr.patch b/0001-remove-requirement-on-pbr.patch new file mode 100644 index 0000000..24cbb78 --- /dev/null +++ b/0001-remove-requirement-on-pbr.patch @@ -0,0 +1,29 @@ +From 0e7a3899e182eae8248743e9a11f6413c4733704 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Wed, 9 Oct 2013 12:38:40 +0100 +Subject: [PATCH] remove requirement on pbr + +--- + swift/__init__.py | 9 ++------- + 1 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/swift/__init__.py b/swift/__init__.py +index 7e8fb7b..d7a4012 100644 +--- a/swift/__init__.py ++++ b/swift/__init__.py +@@ -16,13 +16,8 @@ + import os + import gettext + +-import pbr.version +- +- +-_version_info = pbr.version.VersionInfo('swift') +-__version__ = _version_info.release_string() +-__canonical_version__ = _version_info.version_string() +- ++__version__ = "%RPMVERSION%-%RPMRELEASE%" ++__canonical_version__ = "%RPMVERSION%" + + _localedir = os.environ.get('SWIFT_LOCALEDIR') + _t = gettext.translation('swift', localedir=_localedir, fallback=True) diff --git a/openstack-swift.spec b/openstack-swift.spec index 5b9c105..38576f8 100644 --- a/openstack-swift.spec +++ b/openstack-swift.spec @@ -47,6 +47,11 @@ Source20: %{name}.tmpfs Source7: swift.conf BuildRoot: %{_tmppath}/swift-%{version}-%{release}-root-%(%{__id_u} -n) +# +# patches_base=1.10.0.rc1 +# +Patch0001: 0001-remove-requirement-on-pbr.patch + BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools @@ -156,11 +161,15 @@ This package contains documentation files for %{name}. %prep %setup -q -n swift-%{version}.rc1 +%patch0001 -p1 # Remove bundled egg-info rm -rf swift.egg-info # let RPM handle deps sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py +# Remove dependency on pbr and set version as per rpm +sed -i 's/%RPMVERSION%/%{version}/; s/%RPMRELEASE%/%{release}/' swift/__init__.py + %build %{__python} setup.py build # Fails unless we create the build directory @@ -443,7 +452,7 @@ exit 0 %doc LICENSE doc/build/html %changelog -* Mon Sep 23 2013 Pete Zaitcev 1.10.0-0.1.rc1 +* Wed Oct 09 2013 Pete Zaitcev 1.10.0-0.1.rc1 - Update to 1.10.0 RC1 * Mon Sep 23 2013 Pete Zaitcev 1.9.1-2