Compare commits

...

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

4 changed files with 46 additions and 74 deletions

2
.gitignore vendored
View File

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

View File

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

View File

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

View File

@ -1,18 +1,12 @@
# There is an exception to ship python2-pytz on Fedora, for trac: # Prepared for Python 2 removal
# 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 %bcond_with python2
%endif
# Allow build without test # Allow build without test
%bcond_without tests %bcond_without tests
Name: pytz Name: pytz
Version: 2021.1 Version: 2019.3
Release: 5%{?dist} Release: 4%{?dist}
Summary: World Timezone Definitions for Python Summary: World Timezone Definitions for Python
License: MIT License: MIT
@ -22,8 +16,7 @@ Source0: %pypi_source
Patch0: pytz-zoneinfo.patch Patch0: pytz-zoneinfo.patch
# https://bugzilla.redhat.com/1497572 # https://bugzilla.redhat.com/1497572
Patch1: remove_tzinfo_test.patch Patch1: remove_tzinfo_test.patch
# https://bugzilla.redhat.com/2216116 # https://bugzilla.redhat.com/show_bug.cgi?id=2217853
# https://issues.redhat.com/browse/RHEL-676
# Upstream: https://github.com/stub42/pytz/commit/07aa4d962dae5cb7ced4f61fe85a9001a01676df # Upstream: https://github.com/stub42/pytz/commit/07aa4d962dae5cb7ced4f61fe85a9001a01676df
# Upstream changed the way it includes the tzdata which is something # Upstream changed the way it includes the tzdata which is something
# we cannot replicate downstream because we use the databse provided # we cannot replicate downstream because we use the databse provided
@ -32,6 +25,10 @@ Patch1: remove_tzinfo_test.patch
Patch2: fix_ftbfs_with_newer_tzdata.patch Patch2: fix_ftbfs_with_newer_tzdata.patch
BuildArch: noarch 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\ %global _description\
pytz brings the Olson tz database into Python. This library allows accurate\ pytz brings the Olson tz database into Python. This library allows accurate\
@ -50,24 +47,29 @@ Almost all (over 540) of the Olson timezones are supported.
Summary: %summary Summary: %summary
%{?python_provide:%python_provide python2-%{name}} %{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python2-setuptools %if %{with tests}
BuildRequires: python2-pytest
%endif
Requires: tzdata Requires: tzdata
# Remove before F30
Provides: pytz = %{version}-%{release}
Obsoletes: pytz < %{version}-%{release}
%description -n python2-%{name} %_description %description -n python2-%{name} %_description
%endif %endif
%package -n python3-%{name} %package -n python%{python3_pkgversion}-%{name}
Summary: %summary Summary: %summary
%{?python_provide:%python_provide python3-%{name}} %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
BuildRequires: python3-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python3-setuptools BuildRequires: python%{python3_pkgversion}-rpm-macros
%if %{with tests} %if %{with tests}
BuildRequires: python3-pytest BuildRequires: python%{python3_pkgversion}-pytest
%endif %endif
Requires: tzdata Requires: tzdata
%description -n python3-%{name} %_description %description -n python%{python3_pkgversion}-%{name} %_description
%prep %prep
@ -90,11 +92,14 @@ pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib}
%py3_install %py3_install
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib} pathfix%{python3_version}.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
%check %check
%if %{with tests} %if %{with tests}
%if %{with python2}
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v
%endif
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%endif %endif
@ -102,62 +107,28 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%if %{with python2} %if %{with python2}
%files -n python2-%{name} %files -n python2-%{name}
%license LICENSE.txt %license LICENSE.txt
%doc README.rst %doc README.txt
%{python2_sitelib}/pytz/ %{python2_sitelib}/pytz/
%{python2_sitelib}/*.egg-info/ %{python2_sitelib}/*.egg-info
%endif %endif
%files -n python3-pytz %files -n python%{python3_pkgversion}-pytz
%license LICENSE.txt %license LICENSE.txt
%doc README.rst %doc README.txt
%{python3_sitelib}/pytz/ %{python3_sitelib}/pytz/
%{python3_sitelib}/*.egg-info/ %{python3_sitelib}/*.egg-info
%changelog %changelog
* Tue Jun 27 2023 Lumír Balhar <lbalhar@redhat.com> - 2021.1-5 * Tue Jun 27 2023 Lumír Balhar <lbalhar@redhat.com> - 2019.3-4
- Fix FTBFS with newest tzdata - Fix FTBFS with newest tzdata
Resolves: RHEL-676 Resolves: rhbz#2217853
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2021.1-4 * Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2019.3-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Exclude unsupported i686 arch
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2021.1-3 * Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2019.3-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Adjusted for Python 3.8 module in RHEL 8
* 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 * Mon Oct 07 2019 Gwyn Ciesla <gwync@protonmail.com> - 2019.3-1
- 2019.3 - 2019.3