#1 Updated patch to exclude also "leapseconds" file
Merged 4 months ago by tdawson. Opened 5 months ago by lbalhar.
rpms/ lbalhar/python3-pytz epel7  into  epel7

file renamed
+14 -2

@@ -1,5 +1,14 @@ 

+ From 9259beb33ee2c79de1c741bca2784c04b337486b Mon Sep 17 00:00:00 2001

+ From: Lumir Balhar <lbalhar@redhat.com>

+ Date: Thu, 7 Feb 2019 09:09:17 +0100

+ Subject: [PATCH] Use tzinfo files from system path

+ 

+ ---

+  pytz/__init__.py | 1074 ++--------------------------------------------

+  1 file changed, 27 insertions(+), 1047 deletions(-)

+ 

  diff --git a/pytz/__init__.py b/pytz/__init__.py

- index 13c83b1..e8a674f 100644

+ index 13c83b1..ce8a53c 100644

  --- a/pytz/__init__.py

  +++ b/pytz/__init__.py

  @@ -70,6 +70,9 @@ else: # Python 2.x

@@ -639,7 +648,7 @@ 

  +

  +    all_timezones.extend(os.path.join(root, tz_file)[len(_tzinfo_dir)+1:]

  +            for tz_file in files

- +            if tz_file != 'README' and tz_file != 'Theory'

+ +            if tz_file not in ['leapseconds', 'README', 'Theory']

  +            and '.' not in tz_file)

   all_timezones = LazyList(

           tz for tz in all_timezones if resource_exists(tz))

@@ -1101,3 +1110,6 @@ 

   common_timezones = LazyList(

               tz for tz in common_timezones if tz in all_timezones)

           

+ -- 

+ 2.20.1

+ 

file modified
+5 -2

@@ -2,7 +2,7 @@ 

  

  Name:           python3-%{srcname}

  Version:        2017.2

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        World Timezone Definitions for Python

  

  Group:          Development/Languages

@@ -10,7 +10,7 @@ 

  URL:            http://pytz.sourceforge.net/

  Source0:        https://pypi.io/packages/source/p/%{srcname}/%{srcname}-%{version}.zip

  # Patch to use the system supplied zoneinfo files

- Patch0:         pytz-zoneinfo.patch

+ Patch0:         0001-Use-tzinfo-files-from-system-path.patch

  

  BuildArch:      noarch

  

@@ -66,6 +66,9 @@ 

  

  

  %changelog

+ * Thu Feb 07 2019 Lumír Balhar <lbalhar@redhat.com> - 2017.2-2

+ - Updated patch to exclude also "leapseconds" file

+ 

  * Tue Aug 29 2017 Orion Poplawski <orion@cora.nwra.com> - 2017.2-1

  - Update to 2017.2

  

There is a new file leapseconds in /usr/share/zoneinfo so I've updated the downstream patch to omit this file from the list of timezones.

Pulling in as part of the python36 update.

Pull-Request has been merged by tdawson

4 months ago