Compare commits

...

No commits in common. "c8-stream-3.8" and "c9-beta" have entirely different histories.

4 changed files with 74 additions and 46 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/pytz-2019.3.tar.gz
SOURCES/pytz-2021.1.tar.gz

View File

@ -1 +1 @@
fc320b8b76a6067f16bbc3b8c365766978b5252f SOURCES/pytz-2019.3.tar.gz
738cff9addf39084e5655558482f865dca2c66dd SOURCES/pytz-2021.1.tar.gz

View File

@ -1,5 +1,5 @@
diff --git a/pytz/__init__.py b/pytz/__init__.py
index d217c96..2b1ac03 100644
index e2f49fa..65c1d11 100644
--- a/pytz/__init__.py
+++ b/pytz/__init__.py
@@ -74,6 +74,9 @@ else: # Python 2.x
@ -38,9 +38,7 @@ index d217c96..2b1ac03 100644
return open(filename, 'rb')
--- pytz-2019.2/pytz/__init__.py~ 2019-07-31 12:32:00.000000000 -0500
+++ pytz-2019.2/pytz/__init__.py 2019-07-31 12:44:07.995969364 -0500
@@ -495,1044 +495,37 @@
@@ -514,1044 +502,38 @@ def _test():
if __name__ == '__main__':
_test()
@ -220,6 +218,7 @@ index d217c96..2b1ac03 100644
- 'America/North_Dakota/Beulah',
- 'America/North_Dakota/Center',
- 'America/North_Dakota/New_Salem',
- 'America/Nuuk',
- 'America/Ojinaga',
- 'America/Panama',
- 'America/Pangnirtung',
@ -759,7 +758,6 @@ index d217c96..2b1ac03 100644
- 'America/Fort_Nelson',
- 'America/Fortaleza',
- 'America/Glace_Bay',
- 'America/Godthab',
- 'America/Goose_Bay',
- 'America/Grand_Turk',
- 'America/Grenada',
@ -813,6 +811,7 @@ index d217c96..2b1ac03 100644
- 'America/North_Dakota/Beulah',
- 'America/North_Dakota/Center',
- 'America/North_Dakota/New_Salem',
- 'America/Nuuk',
- 'America/Ojinaga',
- 'America/Panama',
- 'America/Pangnirtung',
@ -961,7 +960,6 @@ index d217c96..2b1ac03 100644
- 'Australia/Adelaide',
- 'Australia/Brisbane',
- 'Australia/Broken_Hill',
- 'Australia/Currie',
- 'Australia/Darwin',
- 'Australia/Eucla',
- 'Australia/Hobart',
@ -1095,8 +1093,9 @@ index d217c96..2b1ac03 100644
- 'US/Pacific',
- 'UTC']
+
+common_timezones = [l.split()[2]
+ for l in open(os.path.join(_tzinfo_dir, 'zone.tab'))
+with open(os.path.join(_tzinfo_dir, 'zone.tab')) as zonetab:
+ common_timezones = [l.split()[2]
+ for l in zonetab
+ if l != '' and l[0] != '#']
+common_timezones.extend(
+ ['GMT',

View File

@ -1,12 +1,18 @@
# Prepared for Python 2 removal
# There is an exception to ship python2-pytz on Fedora, for trac:
# https://pagure.io/fesco/issue/2260
# Trac has been switched to Python 3 in Fedora 34
%if 0%{?fedora} && 0%{?fedora} < 34
%bcond_without python2
%else
%bcond_with python2
%endif
# Allow build without test
%bcond_without tests
Name: pytz
Version: 2019.3
Release: 4%{?dist}
Version: 2021.1
Release: 5%{?dist}
Summary: World Timezone Definitions for Python
License: MIT
@ -16,7 +22,8 @@ Source0: %pypi_source
Patch0: pytz-zoneinfo.patch
# https://bugzilla.redhat.com/1497572
Patch1: remove_tzinfo_test.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2217853
# https://bugzilla.redhat.com/2216116
# https://issues.redhat.com/browse/RHEL-676
# Upstream: https://github.com/stub42/pytz/commit/07aa4d962dae5cb7ced4f61fe85a9001a01676df
# Upstream changed the way it includes the tzdata which is something
# we cannot replicate downstream because we use the databse provided
@ -25,10 +32,6 @@ Patch1: remove_tzinfo_test.patch
Patch2: fix_ftbfs_with_newer_tzdata.patch
BuildArch: noarch
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
%global _description\
pytz brings the Olson tz database into Python. This library allows accurate\
@ -47,29 +50,24 @@ Almost all (over 540) of the Olson timezones are supported.
Summary: %summary
%{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-devel
%if %{with tests}
BuildRequires: python2-pytest
%endif
BuildRequires: python2-setuptools
Requires: tzdata
# Remove before F30
Provides: pytz = %{version}-%{release}
Obsoletes: pytz < %{version}-%{release}
%description -n python2-%{name} %_description
%endif
%package -n python%{python3_pkgversion}-%{name}
%package -n python3-%{name}
Summary: %summary
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python3-pytest
%endif
Requires: tzdata
%description -n python%{python3_pkgversion}-%{name} %_description
%description -n python3-%{name} %_description
%prep
@ -92,14 +90,11 @@ pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib}
%py3_install
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
pathfix%{python3_version}.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
%check
%if %{with tests}
%if %{with python2}
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v
%endif
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%endif
@ -107,28 +102,62 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%if %{with python2}
%files -n python2-%{name}
%license LICENSE.txt
%doc README.txt
%doc README.rst
%{python2_sitelib}/pytz/
%{python2_sitelib}/*.egg-info
%{python2_sitelib}/*.egg-info/
%endif
%files -n python%{python3_pkgversion}-pytz
%files -n python3-pytz
%license LICENSE.txt
%doc README.txt
%doc README.rst
%{python3_sitelib}/pytz/
%{python3_sitelib}/*.egg-info
%{python3_sitelib}/*.egg-info/
%changelog
* Tue Jun 27 2023 Lumír Balhar <lbalhar@redhat.com> - 2019.3-4
* Tue Jun 27 2023 Lumír Balhar <lbalhar@redhat.com> - 2021.1-5
- Fix FTBFS with newest tzdata
Resolves: rhbz#2217853
Resolves: RHEL-676
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2019.3-3
- Exclude unsupported i686 arch
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2021.1-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2019.3-2
- Adjusted for Python 3.8 module in RHEL 8
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2021.1-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Mar 16 2021 Miro Hrončok <mhroncok@redhat.com> - 2021.1-2
- Always close the zone.tab file
* Mon Feb 01 2021 Gwyn Ciesla <gwync@protonmail.com> - 2021.1-1
- 2021.1
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Dec 24 2020 Gwyn Ciesla <gwync@protonmail.com> - 2020.5-1
- 2020.5
* Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.4-3
- Disable Python 2 in Fedora 34+
* Wed Nov 25 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.4-2
- Disable Python 2 in ELN
* Mon Nov 02 2020 Gwyn Ciesla <gwync@protonmail.com> - 2020.4-1
- 2020.4
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.1-2
- Rebuilt for Python 3.9
* Tue Apr 28 2020 Gwyn Ciesla <gwync@protonmail.com> - 2020.1-1
- 2020.1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Oct 07 2019 Gwyn Ciesla <gwync@protonmail.com> - 2019.3-1
- 2019.3