From 230a43de5be2b1df80d5c64cdd528e5ed4dca5d1 Mon Sep 17 00:00:00 2001 From: FFrog Date: Fri, 28 Jan 2022 15:11:46 +0800 Subject: [PATCH] remove the support of python2 --- pytz.spec | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/pytz.spec b/pytz.spec index d8eb2f1..d101548 100644 --- a/pytz.spec +++ b/pytz.spec @@ -1,6 +1,6 @@ Name: pytz Version: 2020.1 -Release: 1 +Release: 2 Summary: World Timezone Definitions for Python License: MIT URL: http://pytz.sourceforge.net/ @@ -19,15 +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 Python Library Reference (datetime.tzinfo). -%package -n python2-pytz -Summary: python2 for pytz -BuildRequires: python2-devel python2-setuptools python2-pytest -Requires: tzdata -%{?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-setuptools python3-pytest @@ -41,30 +32,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 @@ -72,6 +50,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v %{python3_sitelib}/* %changelog +* Thur Jan 27 2022 lijiawei - 2020.1-2 +- Remove python2 support + * Wed Aug 26 2020 lunankun - 2020.1-1 - Type:requirement - ID:NA -- Gitee