Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
3fb02efa6d
!21 sync master to remove useless patch
From: @yangl777 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-06-23 06:57:28 +00:00
yangl777
a4555cf214 remove useless patch 2022-06-23 10:13:12 +08:00
openeuler-ci-bot
5ac79f83f3 !15 Update pytz version to 2021.3
Merge pull request !15 from yangl777/openEuler-22.03-LTS-Next
2021-12-21 02:04:33 +00:00
yangl777
57867e6907 update pytz version to 2021.3 2021-12-16 10:53:05 +08:00
openeuler-ci-bot
b87606c07d !13 [sync] PR-12: update version to 2021.1
From: @openeuler-sync-bot
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-08-23 06:16:58 +00:00
FFrog
83067b5135 update version to 2021.1
(cherry picked from commit c0d483c37be6f01a83e1423f6b57fd2955b87bcd)
2021-08-20 09:59:31 +08:00
openeuler-ci-bot
ea93dc7a2d !11 update pytz to 2020.5
From: @haochenstar
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2021-01-30 17:49:54 +08:00
haochenstar
11eb079f58 update pytz to 2020.5 2021-01-29 14:59:12 +08:00
openeuler-ci-bot
6cdd554bfd !10 remove python2,don't support python2 anymore
From: @eaglegai
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2020-10-29 20:43:13 +08:00
eaglegai
7248d8a1e4 remove python2, don't support python2 anymore 2020-10-29 14:18:39 +08:00
5 changed files with 43 additions and 41 deletions

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,9 @@ 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,1045 +495,37 @@
--- 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 @@
if __name__ == '__main__':
_test()
@ -588,6 +588,7 @@ index d217c96..2b1ac03 100644
- 'Pacific/Guam',
- 'Pacific/Honolulu',
- 'Pacific/Johnston',
- 'Pacific/Kanton',
- 'Pacific/Kiritimati',
- 'Pacific/Kosrae',
- 'Pacific/Kwajalein',
@ -638,7 +639,6 @@ index d217c96..2b1ac03 100644
- 'W-SU',
- 'WET',
- 'Zulu']
+
+all_timezones = []
+for root, dirs, files in os.walk(_tzinfo_dir):
+ for exclude in 'posix', 'right':
@ -962,7 +962,6 @@ index d217c96..2b1ac03 100644
- 'Australia/Adelaide',
- 'Australia/Brisbane',
- 'Australia/Broken_Hill',
- 'Australia/Currie',
- 'Australia/Darwin',
- 'Australia/Eucla',
- 'Australia/Hobart',
@ -1056,7 +1055,6 @@ index d217c96..2b1ac03 100644
- 'Pacific/Chuuk',
- 'Pacific/Easter',
- 'Pacific/Efate',
- 'Pacific/Enderbury',
- 'Pacific/Fakaofo',
- 'Pacific/Fiji',
- 'Pacific/Funafuti',
@ -1065,6 +1063,7 @@ index d217c96..2b1ac03 100644
- 'Pacific/Guadalcanal',
- 'Pacific/Guam',
- 'Pacific/Honolulu',
- 'Pacific/Kanton',
- 'Pacific/Kiritimati',
- 'Pacific/Kosrae',
- 'Pacific/Kwajalein',
@ -1096,9 +1095,10 @@ index d217c96..2b1ac03 100644
- 'US/Pacific',
- 'UTC']
+
+common_timezones = [l.split()[2]
+ for l in open(os.path.join(_tzinfo_dir, 'zone.tab'))
+ if l != '' and l[0] != '#']
+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',
+ 'US/Alaska',

Binary file not shown.

BIN
pytz-2021.3.tar.gz Normal file

Binary file not shown.

View File

@ -1,14 +1,16 @@
%bcond_with tests
Name: pytz
Version: 2020.1
Release: 1
Version: 2021.3
Release: 2
Summary: World Timezone Definitions for Python
License: MIT
URL: http://pytz.sourceforge.net/
Source0: https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz
Source0: https://files.pythonhosted.org/packages/e3/8e/1cde9d002f48a940b9d9d38820aaf444b229450c0854bdf15305ce4a3d1a/pytz-2021.3.tar.gz
Patch0: pytz-zoneinfo.patch
Patch1: remove_tzinfo_test.patch
Patch9000: 0001-modify-timezone-from-Macau-to-Macao.patch
Patch0: backport-pytz-zoneinfo.patch
Patch1: backport-remove_tzinfo_test.patch
Patch2: 0001-modify-timezone-from-Macau-to-Macao.patch
BuildArch: noarch
@ -19,20 +21,9 @@ 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 python3-pytest
BuildRequires: python3-devel tzdata python3-pytest
Requires: tzdata
%{?python_provide:%python_provide python3-%{name}}
@ -43,30 +34,17 @@ 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
@ -74,6 +52,30 @@ 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