Compare commits
10 Commits
caf859905e
...
3fb02efa6d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fb02efa6d | ||
|
|
a4555cf214 | ||
|
|
5ac79f83f3 | ||
|
|
57867e6907 | ||
|
|
b87606c07d | ||
|
|
83067b5135 | ||
|
|
ea93dc7a2d | ||
|
|
11eb079f58 | ||
|
|
6cdd554bfd | ||
|
|
7248d8a1e4 |
@ -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
BIN
pytz-2021.3.tar.gz
Normal file
Binary file not shown.
64
pytz.spec
64
pytz.spec
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user