c2c480
%if 0%{?fedora} > 12
c2c480
%global with_python3 1
c2c480
%else
c2c480
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
c2c480
%endif
c2c480
c2c480
Name:           pytz
c2c480
Version:        2012d
5fa1b2
Release:        5%{?dist}
c2c480
Summary:        World Timezone Definitions for Python
c2c480
c2c480
Group:          Development/Languages
c2c480
License:        MIT
c2c480
URL:            http://pytz.sourceforge.net/
c2c480
Source0:        http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
c2c480
Patch0:         pytz-2012d_zoneinfo.patch
c2c480
c2c480
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c2c480
c2c480
BuildArch:      noarch
c2c480
BuildRequires:  python2-devel
c2c480
c2c480
%if 0%{?with_python3}
c2c480
BuildRequires:  python3-devel
c2c480
%endif
c2c480
c2c480
Requires: tzdata
c2c480
c2c480
%description
c2c480
pytz brings the Olson tz database into Python. This library allows accurate
c2c480
and cross platform timezone calculations using Python 2.3 or higher. It
c2c480
also solves the issue of ambiguous times at the end of daylight savings,
c2c480
which you can read more about in the Python Library Reference
c2c480
(datetime.tzinfo).
c2c480
c2c480
Amost all (over 540) of the Olson timezones are supported.
c2c480
c2c480
%if 0%{?with_python3}
c2c480
%package -n python3-%{name}
c2c480
Requires:   python3
c2c480
Summary:    World Timezone Definitions for Python
c2c480
c2c480
Group:      Development/Languages
c2c480
%description -n python3-%{name}
c2c480
pytz brings the Olson tz database into Python. This library allows accurate
c2c480
and cross platform timezone calculations using Python 2.3 or higher. It
c2c480
also solves the issue of ambiguous times at the end of daylight savings,
c2c480
which you can read more about in the Python Library Reference
c2c480
(datetime.tzinfo).
c2c480
c2c480
Amost all (over 540) of the Olson timezones are supported.
c2c480
%endif
c2c480
c2c480
%prep
c2c480
%setup -q
c2c480
%patch0 -p0
c2c480
c2c480
%if 0%{?with_python3}
c2c480
cp -a . %{py3dir}
c2c480
%endif
c2c480
c2c480
%build
c2c480
%{__python} setup.py build
c2c480
%if 0%{?with_python3}
c2c480
pushd %{py3dir}
c2c480
%{__python3} setup.py build
c2c480
popd
c2c480
%endif # with_python3
c2c480
c2c480
c2c480
c2c480
%install
c2c480
%{__python} setup.py install --skip-build --root %{buildroot}
c2c480
chmod +x %{buildroot}%{python_sitelib}/pytz/*.py
c2c480
rm -rf  %{buildroot}%{python_sitelib}/pytz/zoneinfo
c2c480
c2c480
%if 0%{?with_python3}
c2c480
pushd %{py3dir}
c2c480
%{__python3} setup.py install --skip-build --root %{buildroot}
c2c480
popd
c2c480
%endif # with_python3
c2c480
c2c480
c2c480
%clean
c2c480
rm -rf $RPM_BUILD_ROOT
c2c480
c2c480
c2c480
%files
c2c480
%defattr(-,root,root,-)
c2c480
%doc CHANGES.txt LICENSE.txt README.txt
c2c480
%{python_sitelib}/pytz/
c2c480
%{python_sitelib}/*.egg-info
c2c480
c2c480
%if 0%{?with_python3}
c2c480
%files -n python3-pytz
c2c480
%doc CHANGES.txt LICENSE.txt README.txt
c2c480
%{python3_sitelib}/pytz/
c2c480
%{python3_sitelib}/*.egg-info
c2c480
%endif # with_python3
c2c480
c2c480
c2c480
%changelog
5fa1b2
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2012d-5
5fa1b2
- Mass rebuild 2013-12-27
5fa1b2
c2c480
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012d-4
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c2c480
c2c480
* Thu Jan  3 2013 David Malcolm <dmalcolm@redhat.com> - 2012d-3
c2c480
- remove rhel logic from with_python3 conditional
c2c480
c2c480
* Fri Sep 14 2012 Jon Ciesla <limburgher@gmail.com> - 2012d-2
c2c480
- Use system zoneinfo, BZ 857266.
c2c480
c2c480
* Thu Aug 23 2012 Jon Ciesla <limburgher@gmail.com> - 2012d-1
c2c480
- Latest upstream, python3 support, BZ 851226.
c2c480
c2c480
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2010h-6
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c2c480
c2c480
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2010h-5
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c2c480
c2c480
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2010h-4
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c2c480
c2c480
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2010h-3
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
c2c480
c2c480
* Mon Jun 28 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 2010h-2
c2c480
- Define => global
c2c480
c2c480
* Tue Apr 27 2010 Jon Ciesla <limb@jcomserv.net> - 2010h-1
c2c480
- Update to current version, BZ 573252.
c2c480
c2c480
* Mon Feb 01 2010 Jon Ciesla <limb@jcomserv.net> - 2009i-7
c2c480
- Corrected Source0 URL, BZ 560168.
c2c480
c2c480
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2008i-6
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c2c480
c2c480
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2008i-5
c2c480
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c2c480
c2c480
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2008i-4
c2c480
- Rebuild for Python 2.6
c2c480
c2c480
* Tue Nov 18 2008 Jef Spaleta <jspaleta at fedoraproject dot org> 2008i-3
c2c480
- Apply patch correctly.
c2c480
c2c480
* Thu Nov 13 2008 Jef Spaleta <jspaleta at fedoraproject dot org> 2008i-2
c2c480
- Updated tzdata patch from Petr Machata bug 471014
c2c480
c2c480
* Tue Nov 11 2008 Jef Spaleta <jspaleta at fedoraproject dot org> 2008i-1
c2c480
- Update to latest, now using timezone files provided by tzdata package
c2c480
c2c480
* Fri Jan 04 2008 Jef Spaleta <jspaleta@gmail.com> 2006p-3
c2c480
- Fix for egg-info file creation
c2c480
c2c480
* Mon Dec 11 2006 Jef Spaleta <jspaleta@gmail.com> 2006p-2
c2c480
- Bump for rebuild against python 2.5 and change BR to python-devel accordingly
c2c480
c2c480
* Fri Dec  8 2006 Orion Poplawski <orion@cora.nwra.com> 2006p-1
c2c480
- Update to 2006p
c2c480
c2c480
* Thu Sep  7 2006 Orion Poplawski <orion@cora.nwra.com> 2006g-1
c2c480
- Update to 2006g
c2c480
c2c480
* Mon Feb 13 2006 Orion Poplawski <orion@cora.nwra.com> 2005r-2
c2c480
- Rebuild for gcc/glibc changes
c2c480
c2c480
* Tue Jan  3 2006 Orion Poplawski <orion@cora.nwra.com> 2005r-1
c2c480
- Update to 2005r
c2c480
c2c480
* Thu Dec 22 2005 Orion Poplawski <orion@cora.nwra.com> 2005m-1
c2c480
- Update to 2005m
c2c480
c2c480
* Fri Jul 22 2005 Orion Poplawski <orion@cora.nwra.com> 2005i-2
c2c480
- Remove -O1 from install command
c2c480
c2c480
* Tue Jul 05 2005 Orion Poplawski <orion@cora.nwra.com> 2005i-1
c2c480
- Initial Fedora Extras package