pytz/pytz.spec

93 lines
2.5 KiB
RPMSpec
Raw Normal View History

2021-12-08 16:53:29 +08:00
%bcond_with tests
2019-09-30 11:15:40 -04:00
Name: pytz
2021-12-08 16:53:29 +08:00
Version: 2021.3
2022-06-23 10:13:12 +08:00
Release: 2
2019-09-30 11:15:40 -04:00
Summary: World Timezone Definitions for Python
License: MIT
URL: http://pytz.sourceforge.net/
2021-12-08 16:53:29 +08:00
Source0: https://files.pythonhosted.org/packages/e3/8e/1cde9d002f48a940b9d9d38820aaf444b229450c0854bdf15305ce4a3d1a/pytz-2021.3.tar.gz
2019-09-30 11:15:40 -04:00
2021-12-08 16:53:29 +08:00
Patch0: backport-pytz-zoneinfo.patch
Patch1: backport-remove_tzinfo_test.patch
Patch2: 0001-modify-timezone-from-Macau-to-Macao.patch
2019-09-30 11:15:40 -04:00
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
2021-12-08 16:53:29 +08:00
BuildRequires: python3-devel tzdata python3-pytest
2019-09-30 11:15:40 -04:00
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}
2020-01-21 15:21:26 +08:00
sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python3_sitelib}/*.egg-info/SOURCES.txt
2019-09-30 11:15:40 -04:00
%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%files -n python3-pytz
%defattr(-,root,root)
2020-07-27 15:33:07 +08:00
%doc README.rst
2019-09-30 11:15:40 -04:00
%license LICENSE.txt
%{python3_sitelib}/*
%changelog
2022-06-23 10:13:12 +08:00
* Tue Jun 21 2022 yanglu <yanglu72@h-partners.com> - 2021.3-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:remove useless patch
2021-12-08 16:53:29 +08:00
* 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
2021-01-29 14:59:12 +08:00
* 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
2020-07-27 15:33:07 +08:00
* Mon Jul 27 2020 lunankun <lunankun@huawei.com> - 2020.1-1
- Type:update
- ID:NA
- SUG:reboot
- DESC:update to pytz-2020.1
2020-01-21 15:21:26 +08:00
* 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
2019-09-30 11:15:40 -04:00
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 2019.2-1
- Package init