Blame SPECS/pytz.spec

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