%global srcname pytz Name: python3-%{srcname} Version: 2017.2 Release: 2%{?dist} Summary: World Timezone Definitions for Python Group: Development/Languages License: MIT URL: http://pytz.sourceforge.net/ Source0: https://pypi.io/packages/source/p/%{srcname}/%{srcname}-%{version}.zip # Patch to use the system supplied zoneinfo files Patch0: 0001-Use-tzinfo-files-from-system-path.patch BuildArch: noarch %description pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.3 or higher. It also solves the issue of ambiguous times at the end of daylight savings, which you can read more about in the Python Library Reference (datetime.tzinfo). Almost all (over 540) of the Olson timezones are supported. %package -n python%{python3_pkgversion}-%{srcname} Summary: World Timezone Definitions for Python Group: Development/Languages BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest Requires: tzdata %description -n python%{python3_pkgversion}-%{srcname} pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.3 or higher. It also solves the issue of ambiguous times at the end of daylight savings, which you can read more about in the Python Library Reference (datetime.tzinfo). Almost all (over 540) of the Olson timezones are supported. %prep %setup -q -n %{srcname}-%{version} %patch0 -p1 -b .zoneinfo %build %py3_build %install %py3_install rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo %check PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v %files -n python%{python3_pkgversion}-pytz %license LICENSE.txt %doc CHANGES.txt README.txt %{python3_sitelib}/pytz/ %{python3_sitelib}/*.egg-info %changelog * Thu Feb 07 2019 Lumír Balhar - 2017.2-2 - Updated patch to exclude also "leapseconds" file * Tue Aug 29 2017 Orion Poplawski - 2017.2-1 - Update to 2017.2 * Tue Nov 8 2016 Orion Poplawski - 2016.7-1 - Update to 2016.7 * Mon May 16 2016 Orion Poplawski - 2016.4-1 - Initial EPEL7 package