73 lines
1.9 KiB
RPMSpec
73 lines
1.9 KiB
RPMSpec
Name: pytz
|
|
Version: 2020.1
|
|
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
|
|
|
|
Patch0: pytz-zoneinfo.patch
|
|
Patch1: remove_tzinfo_test.patch
|
|
Patch2: 0001-modify-timezone-from-Macau-to-Macao.patch
|
|
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
pytz brings the Olson tz database into Python. This library allows
|
|
accurate and cross platform timezone calculations using Python 2.4
|
|
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 python3-pytz
|
|
Summary: python3 for pytz
|
|
BuildRequires: python3-devel python3-pytest
|
|
Requires: tzdata
|
|
%{?python_provide:%python_provide python3-%{name}}
|
|
|
|
%description -n python3-pytz
|
|
python3 for pytz
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%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}%{python3_sitelib} %{__python3} -m pytest -v
|
|
|
|
%files -n python3-pytz
|
|
%defattr(-,root,root)
|
|
%doc README.rst
|
|
%license LICENSE.txt
|
|
%{python3_sitelib}/*
|
|
|
|
%changelog
|
|
* 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
|
|
- SUG:reboot
|
|
- DESC:update to pytz-2020.1
|
|
|
|
* Tue Jan 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 2019.2-2
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG:reboot
|
|
- DESC:modify timezone from Macau to Macao
|
|
|
|
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 2019.2-1
|
|
- Package init
|