From 3cef5948799cbef8935975bc2cd986ea735b8851 Mon Sep 17 00:00:00 2001 From: Piotr Date: Dec 16 2018 10:16:41 +0000 Subject: Remove Python 2 subpackage #1659744 --- diff --git a/python-tzlocal.spec b/python-tzlocal.spec index 7b5c8ba..2c7d091 100644 --- a/python-tzlocal.spec +++ b/python-tzlocal.spec @@ -1,16 +1,9 @@ -# enable python3 on fedora -%if 0%{?fedora} -%bcond_without python3 -%else -%bcond_with python3 -%endif - %global srcname tzlocal %global sum A Python module that tries to figure out what your local timezone is Name: python-tzlocal Version: 1.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: %{sum} License: MIT @@ -20,52 +13,19 @@ Source0: https://github.com/regebro/tzlocal/archive/%{version}/%{name}-%{ BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-mock -BuildRequires: python2-pytz -BuildRequires: python2-setuptools - -%if %{with python3} BuildRequires: python3-devel BuildRequires: python3-mock BuildRequires: python3-pytz BuildRequires: python3-setuptools -%endif - - -%description -This Python module returns a tzinfo object with the local timezone information. -It requires pytz, and returns pytz tzinfo objects. This module attempts to fix -a glaring hole in pytz, that there is no way to get the local timezone -information, unless you know the zoneinfo name. - - -%package -n python2-%{srcname} -Summary: %{sum} -License: MIT -Requires: python2-pytz -%{?python_provide:%python_provide python2-%{srcname}} - -%description -n python2-%{srcname} -This Python module returns a tzinfo object with the local timezone information. -It requires pytz, and returns pytz tzinfo objects. This module attempts to fix -a glaring hole in pytz, that there is no way to get the local timezone -information, unless you know the zoneinfo name. - -%if %{with python3} -%package -n python3-%{srcname} -Summary: %{sum} -License: MIT Requires: python3-pytz %{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{srcname} +%description This Python module returns a tzinfo object with the local timezone information. It requires pytz, and returns pytz tzinfo objects. This module attempts to fix a glaring hole in pytz, that there is no way to get the local timezone information, unless you know the zoneinfo name. -%endif %prep @@ -75,52 +35,32 @@ rm -rf *.egg-info %build -%py2_build -%if %{with python3} %py3_build -%endif %install -%py2_install -# Don't install unit tests and test_data -rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/test_data -rm %{buildroot}%{python2_sitelib}/%{srcname}/tests.py* - -%if %{with python3} %py3_install # Don't install unit tests and test_data rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/test_data rm %{buildroot}%{python3_sitelib}/%{srcname}/tests.py rm %{buildroot}%{python3_sitelib}/%{srcname}/__pycache__/tests.cpython* -%endif %check -%{__python2} setup.py test - -%if %{with python3} %{__python3} setup.py test -%endif -%files -n python2-%{srcname} -%doc README.rst CHANGES.txt -%license LICENSE.txt -%{python2_sitelib}/%{srcname} -%{python2_sitelib}/%{srcname}-%{version}-py2.?.egg-info - - -%if %{with python3} -%files -n python3-%{srcname} +%files %doc README.rst CHANGES.txt %license LICENSE.txt %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py3.?.egg-info -%endif %changelog +* Sun Dec 16 2018 Piotr Popieluch - 1.5.1-5 +- Remove Python 2 subpackage #1659744 + * Sat Jul 14 2018 Fedora Release Engineering - 1.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild