pytz/pytz.spec

89 lines
2.4 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:15:40 -04:00
Name: pytz
2020-05-11 20:37:13 +08:00
Version: 2019.3
Release: 1
2019-09-30 11:15:40 -04:00
Summary: World Timezone Definitions for Python
License: MIT
URL: http://pytz.sourceforge.net/
2020-05-11 20:37:13 +08:00
Source0: https://github.com/stub42/pytz/archive/pytz-2019.3.tar.gz
2019-09-30 11:15:40 -04:00
Patch0: pytz-zoneinfo.patch
Patch1: remove_tzinfo_test.patch
2020-01-21 15:21:26 +08:00
Patch9000: 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 python2-pytz
Summary: python2 for pytz
2020-05-11 20:37:13 +08:00
BuildRequires: python2-devel python2-setuptools python2-pytest
2019-09-30 11:15:40 -04:00
Requires: tzdata
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-pytz
python2 for pytz
%package -n python3-pytz
Summary: python3 for pytz
2020-05-11 20:37:13 +08:00
BuildRequires: python3-devel python3-setuptools 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
%py2_build
%py3_build
%install
%py2_install
rm -r %{buildroot}%{python2_sitelib}/pytz/zoneinfo
pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib}
2020-01-21 15:21:26 +08:00
sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python2_sitelib}/*.egg-info/SOURCES.txt
2019-09-30 11:15:40 -04:00
%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}%{python2_sitelib} %{__python2} -m pytest -v
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%files -n python2-pytz
%defattr(-,root,root)
%doc README.txt
%license LICENSE.txt
%{python2_sitelib}/*
%files -n python3-pytz
%defattr(-,root,root)
%doc README.txt
%license LICENSE.txt
%{python3_sitelib}/*
%changelog
2020-05-11 20:37:13 +08:00
* Fri Apr 17 2020 zhangrui <zhangrui182@huawei.com> - 2019.3-1
- Type:update
- ID:NA
- SUG:NA
- DESC:update to 2019.3
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