Compare commits

..

No commits in common. "3fb02efa6dcddda364316d323ff67daed9268d71" and "caf859905e1ea8e16bcf6e407d77b09eec975562" have entirely different histories.

5 changed files with 41 additions and 43 deletions

BIN
pytz-2020.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
diff --git a/pytz/__init__.py b/pytz/__init__.py
index e2f49fa..65c1d11 100644
index d217c96..2b1ac03 100644
--- a/pytz/__init__.py
+++ b/pytz/__init__.py
@@ -74,6 +74,9 @@ else: # Python 2.x
@ -38,9 +38,9 @@ index e2f49fa..65c1d11 100644
return open(filename, 'rb')
--- a/pytz/__init__.py~ 2021-10-04 09:16:08.981477792 -0500
+++ b/pytz/__init__.py 2021-10-04 11:29:19.283758542 -0500
@@ -502,1045 +502,37 @@
--- 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,1045 +495,37 @@
if __name__ == '__main__':
_test()
@ -588,7 +588,6 @@ index e2f49fa..65c1d11 100644
- 'Pacific/Guam',
- 'Pacific/Honolulu',
- 'Pacific/Johnston',
- 'Pacific/Kanton',
- 'Pacific/Kiritimati',
- 'Pacific/Kosrae',
- 'Pacific/Kwajalein',
@ -639,6 +638,7 @@ index e2f49fa..65c1d11 100644
- 'W-SU',
- 'WET',
- 'Zulu']
+
+all_timezones = []
+for root, dirs, files in os.walk(_tzinfo_dir):
+ for exclude in 'posix', 'right':
@ -962,6 +962,7 @@ index e2f49fa..65c1d11 100644
- 'Australia/Adelaide',
- 'Australia/Brisbane',
- 'Australia/Broken_Hill',
- 'Australia/Currie',
- 'Australia/Darwin',
- 'Australia/Eucla',
- 'Australia/Hobart',
@ -1055,6 +1056,7 @@ index e2f49fa..65c1d11 100644
- 'Pacific/Chuuk',
- 'Pacific/Easter',
- 'Pacific/Efate',
- 'Pacific/Enderbury',
- 'Pacific/Fakaofo',
- 'Pacific/Fiji',
- 'Pacific/Funafuti',
@ -1063,7 +1065,6 @@ index e2f49fa..65c1d11 100644
- 'Pacific/Guadalcanal',
- 'Pacific/Guam',
- 'Pacific/Honolulu',
- 'Pacific/Kanton',
- 'Pacific/Kiritimati',
- 'Pacific/Kosrae',
- 'Pacific/Kwajalein',
@ -1095,10 +1096,9 @@ index e2f49fa..65c1d11 100644
- 'US/Pacific',
- 'UTC']
+
+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 = [l.split()[2]
+ for l in open(os.path.join(_tzinfo_dir, 'zone.tab'))
+ if l != '' and l[0] != '#']
+common_timezones.extend(
+ ['GMT',
+ 'US/Alaska',

View File

@ -1,16 +1,14 @@
%bcond_with tests
Name: pytz
Version: 2021.3
Release: 2
Version: 2020.1
Release: 1
Summary: World Timezone Definitions for Python
License: MIT
URL: http://pytz.sourceforge.net/
Source0: https://files.pythonhosted.org/packages/e3/8e/1cde9d002f48a940b9d9d38820aaf444b229450c0854bdf15305ce4a3d1a/pytz-2021.3.tar.gz
Source0: https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz
Patch0: backport-pytz-zoneinfo.patch
Patch1: backport-remove_tzinfo_test.patch
Patch2: 0001-modify-timezone-from-Macau-to-Macao.patch
Patch0: pytz-zoneinfo.patch
Patch1: remove_tzinfo_test.patch
Patch9000: 0001-modify-timezone-from-Macau-to-Macao.patch
BuildArch: noarch
@ -21,9 +19,20 @@ or higher. It also solves the issue of ambiguous times at the end
of daylight saving time, which you can read more about in the
Python Library Reference (datetime.tzinfo).
%package -n python2-pytz
Summary: python2 for pytz
BuildRequires: python2-devel python2-pytest
Requires: tzdata
Provides: pytz = %{version}-%{release}
Obsoletes: pytz < %{version}-%{release}
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-pytz
python2 for pytz
%package -n python3-pytz
Summary: python3 for pytz
BuildRequires: python3-devel tzdata python3-pytest
BuildRequires: python3-devel python3-pytest
Requires: tzdata
%{?python_provide:%python_provide python3-%{name}}
@ -34,17 +43,30 @@ python3 for pytz
%autosetup -n %{name}-%{version} -p1
%build
%py2_build
%py3_build
%install
%py2_install
rm -r %{buildroot}%{python2_sitelib}/pytz/zoneinfo
pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib}
sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python2_sitelib}/*.egg-info/SOURCES.txt
%py3_install
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python3_sitelib}/*.egg-info/SOURCES.txt
%check
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%files -n python2-pytz
%defattr(-,root,root)
%doc README.rst
%license LICENSE.txt
%{python2_sitelib}/*
%files -n python3-pytz
%defattr(-,root,root)
%doc README.rst
@ -52,30 +74,6 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%{python3_sitelib}/*
%changelog
* Tue Jun 21 2022 yanglu <yanglu72@h-partners.com> - 2021.3-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:remove useless patch
* Wed Dec 08 2021 yanglu <yanglu72@openeuler.org> - 2021.3-1
- Update version to 2021.3
* Mon Aug 09 2021 OpenStack_SIG <openstack@openeuler.org> - 2021.1-1
- Update version to 2021.1
* Fri Jan 29 2021 xihaochen <xihaochen@huawei.com> - 2020.5-1
- Type:requirements
- Id:NA
- SUG:NA
- DESC:update pytz to 2020.5
* Thu Oct 29 2020 gaihuiying <gaihuiying1@huawei.com> - 2020.1-2
- Type:requirement
- ID:NA
- SUG:NA
- DESC:remove python2
* Mon Jul 27 2020 lunankun <lunankun@huawei.com> - 2020.1-1
- Type:update
- ID:NA