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