From 3985f1ae8f491c3c9a50e49297918ece0e17b734f43927b3c37b6cfccfb53bad Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Sun, 26 Jul 2015 12:34:42 +0000
Subject: [PATCH] Accepting request 318359 from home:seife:OpenStack:Master
fix build and dependencies on CentOS/RHEL
OBS-URL: https://build.opensuse.org/request/show/318359
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=22
---
python-Babel.changes | 6 ++++++
python-Babel.spec | 9 +++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/python-Babel.changes b/python-Babel.changes
index e8ff22e..b031402 100644
--- a/python-Babel.changes
+++ b/python-Babel.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Jul 24 07:19:45 UTC 2015 - seife+obs@b1-systems.com
+
+- fix build on CentOS/RHEL by specifying TZ=UTC for %check
+- fix CentOS/RHEL by depending on /usr/sbin/update-alternatives
+
-------------------------------------------------------------------
Thu May 28 12:21:10 UTC 2015 - toddrme2178@gmail.com
diff --git a/python-Babel.spec b/python-Babel.spec
index 2db0323..060e01a 100644
--- a/python-Babel.spec
+++ b/python-Babel.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-Babel
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -35,8 +35,9 @@ BuildRequires: python-py >= 1.4.14
BuildRequires: python-pytest >= 2.3.5
BuildRequires: python-pytz
Requires: python-pytz
-Requires(post): update-alternatives
-Requires(postun): update-alternatives
+# absolute path will work cross-distro at least on RHEL and SUSE
+Requires(post): /usr/sbin/update-alternatives
+Requires(postun): /usr/sbin/update-alternatives
Provides: python-babel = %{version}
Obsoletes: python-babel < %{version}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
@@ -68,7 +69,7 @@ ln -sf %{_sysconfdir}/alternatives/pybabel %{buildroot}%{_bindir}/pybabel
%fdupes %{buildroot}%{python_sitelib}
%check
-LC_ALL=C py.test tests
+TZ=UTC LC_ALL=C py.test tests
%pre
# Since /usr/bin/pybabel became ghosted to be used with update-alternatives, we have to get rid