!10 remove python2,don't support python2 anymore
From: @eaglegai Reviewed-by: @orange-snn Signed-off-by: @orange-snn
This commit is contained in:
commit
6cdd554bfd
34
pytz.spec
34
pytz.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pytz
|
Name: pytz
|
||||||
Version: 2020.1
|
Version: 2020.1
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: World Timezone Definitions for Python
|
Summary: World Timezone Definitions for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://pytz.sourceforge.net/
|
URL: http://pytz.sourceforge.net/
|
||||||
@ -8,7 +8,7 @@ Source0: https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987
|
|||||||
|
|
||||||
Patch0: pytz-zoneinfo.patch
|
Patch0: pytz-zoneinfo.patch
|
||||||
Patch1: remove_tzinfo_test.patch
|
Patch1: remove_tzinfo_test.patch
|
||||||
Patch9000: 0001-modify-timezone-from-Macau-to-Macao.patch
|
Patch2: 0001-modify-timezone-from-Macau-to-Macao.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -19,17 +19,6 @@ 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
|
of daylight saving time, which you can read more about in the
|
||||||
Python Library Reference (datetime.tzinfo).
|
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
|
%package -n python3-pytz
|
||||||
Summary: python3 for pytz
|
Summary: python3 for pytz
|
||||||
BuildRequires: python3-devel python3-pytest
|
BuildRequires: python3-devel python3-pytest
|
||||||
@ -43,30 +32,17 @@ python3 for pytz
|
|||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%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
|
%py3_install
|
||||||
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
|
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
|
||||||
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
|
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
|
||||||
sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python3_sitelib}/*.egg-info/SOURCES.txt
|
sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python3_sitelib}/*.egg-info/SOURCES.txt
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v
|
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -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
|
%files -n python3-pytz
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@ -74,6 +50,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Mon Jul 27 2020 lunankun <lunankun@huawei.com> - 2020.1-1
|
||||||
- Type:update
|
- Type:update
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user