-
Notifications
You must be signed in to change notification settings - Fork 1
/
0001-remove-runtime-requirement-on-pbr.patch
38 lines (34 loc) · 1.45 KB
/
0001-remove-runtime-requirement-on-pbr.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 4be54399745009fd48b096a78f8c994904d3d87c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Wed, 9 Oct 2013 12:38:40 +0100
Subject: [PATCH] remove runtime requirement on pbr
---
swift/__init__.py | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/swift/__init__.py b/swift/__init__.py
index 9d0e889..d7a4012 100644
--- a/swift/__init__.py
+++ b/swift/__init__.py
@@ -16,22 +16,8 @@
import os
import gettext
-import pkg_resources
-
-try:
- # First, try to get our version out of PKG-INFO. If we're installed,
- # this'll let us find our version without pulling in pbr. After all, if
- # we're installed on a system, we're not in a Git-managed source tree, so
- # pbr doesn't really buy us anything.
- __version__ = __canonical_version__ = pkg_resources.get_provider(
- pkg_resources.Requirement.parse('swift')).version
-except pkg_resources.DistributionNotFound:
- # No PKG-INFO? We're probably running from a checkout, then. Let pbr do
- # its thing to figure out a version number.
- 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)