c3571d4
# There is an exception to ship python2-pytz on Fedora, for trac:
c3571d4
# https://pagure.io/fesco/issue/2260
c251081
# Trac has been switched to Python 3 in Fedora 34
c251081
%if 0%{?fedora} && 0%{?fedora} < 34
8e64587
%bcond_without python2
c3571d4
%else
c3571d4
%bcond_with python2
c3571d4
%endif
8e64587
8e64587
# Allow build without test
8e64587
%bcond_without tests
8e64587
2c82c5e
Name:           pytz
a5e9c1f
Version:        2020.5
a5e9c1f
Release:        1%{?dist}
2c82c5e
Summary:        World Timezone Definitions for Python
2c82c5e
2c82c5e
License:        MIT
2c82c5e
URL:            http://pytz.sourceforge.net/
568be6b
Source0:        %pypi_source
Orion Poplawski 26b8a0c
# Patch to use the system supplied zoneinfo files
Orion Poplawski 5eac851
Patch0:         pytz-zoneinfo.patch
3edecc0
# https://bugzilla.redhat.com/1497572
3edecc0
Patch1:         remove_tzinfo_test.patch
d55d45a
2c82c5e
BuildArch:      noarch
2c82c5e
9140438
%global _description\
9140438
pytz brings the Olson tz database into Python. This library allows accurate\
9140438
and cross platform timezone calculations using Python 2.3 or higher. It\
9140438
also solves the issue of ambiguous times at the end of daylight savings,\
9140438
which you can read more about in the Python Library Reference\
9140438
(datetime.tzinfo).\
9140438
\
Orion Poplawski 5eac851
Almost all (over 540) of the Olson timezones are supported.
2c82c5e
9140438
%description %_description
9140438
568be6b
8e64587
%if %{with python2}
9140438
%package -n python2-%{name}
568be6b
Summary:        %summary
9140438
%{?python_provide:%python_provide python2-%{name}}
568be6b
BuildRequires:  python2-devel
1513d3a
BuildRequires:  python2-setuptools
568be6b
Requires:       tzdata
9140438
9140438
%description -n python2-%{name} %_description
8e64587
%endif
9140438
568be6b
790efc9
%package -n python3-%{name}
568be6b
Summary:        %summary
568be6b
%{?python_provide:%python_provide python3-%{name}}
Orion Poplawski 5eac851
BuildRequires:  python3-devel
1513d3a
BuildRequires:  python3-setuptools
8e64587
%if %{with tests}
8a88823
BuildRequires:  python3-pytest
8e64587
%endif
Orion Poplawski 5eac851
Requires:       tzdata
790efc9
568be6b
%description -n python3-%{name} %_description
790efc9
790efc9
2c82c5e
%prep
568be6b
%autosetup -p1
790efc9
2c82c5e
2c82c5e
%build
8e64587
%if %{with python2}
568be6b
%py2_build
8e64587
%endif
568be6b
%py3_build
790efc9
2c82c5e
2c82c5e
%install
8e64587
%if %{with python2}
568be6b
%py2_install
Orion Poplawski 5eac851
rm -r %{buildroot}%{python2_sitelib}/pytz/zoneinfo
2689a31
pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib}
8e64587
%endif
790efc9
568be6b
%py3_install
Orion Poplawski 5eac851
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
2689a31
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
790efc9
d4c715a
Orion Poplawski 5eac851
%check
8e64587
%if %{with tests}
568be6b
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
8e64587
%endif
Orion Poplawski 5eac851
Orion Poplawski 5eac851
8e64587
%if %{with python2}
9140438
%files -n python2-%{name}
Orion Poplawski e2a5df9
%license LICENSE.txt
bbc3dcc
%doc README.rst
Orion Poplawski 9ffba5f
%{python2_sitelib}/pytz/
1513d3a
%{python2_sitelib}/*.egg-info/
8e64587
%endif
2c82c5e
790efc9
%files -n python3-pytz
Orion Poplawski e2a5df9
%license LICENSE.txt
bbc3dcc
%doc README.rst
790efc9
%{python3_sitelib}/pytz/
1513d3a
%{python3_sitelib}/*.egg-info/
790efc9
790efc9
2c82c5e
%changelog
a5e9c1f
* Thu Dec 24 2020 Gwyn Ciesla <gwync@protonmail.com> - 2020.5-1
a5e9c1f
- 2020.5
a5e9c1f
c251081
* Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.4-3
c251081
- Disable Python 2 in Fedora 34+
c251081
c3571d4
* Wed Nov 25 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.4-2
c3571d4
- Disable Python 2 in ELN
c3571d4
5590e81
* Mon Nov 02 2020 Gwyn Ciesla <gwync@protonmail.com> - 2020.4-1
5590e81
- 2020.4
5590e81
5aadaf7
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1-3
5aadaf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5aadaf7
78e5076
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.1-2
78e5076
- Rebuilt for Python 3.9
78e5076
bbc3dcc
* Tue Apr 28 2020 Gwyn Ciesla <gwync@protonmail.com> - 2020.1-1
bbc3dcc
- 2020.1
bbc3dcc
5332de9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.3-2
5332de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
5332de9
225e9ff
* Mon Oct 07 2019 Gwyn Ciesla <gwync@protonmail.com> - 2019.3-1
225e9ff
- 2019.3
225e9ff
6dd72d4
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2019.2-3
6dd72d4
- Rebuilt for Python 3.8.0rc1 (#1748018)
6dd72d4
66e6e39
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2019.2-2
66e6e39
- Rebuilt for Python 3.8
66e6e39
a0b60b1
* Wed Jul 31 2019 Gwyn Ciesla <gwync@protonmail.com> - 2019.2-1
a0b60b1
- 2019.2
a0b60b1
5f89271
* Fri Jul 26 2019 Gwyn Ciesla <gwync@protonmail.com> - 2019.1-1
5f89271
- 2019.1
5f89271
002329f
* Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 2018.9-1
002329f
- Update to 2018.9
002329f
- Remove leapseconds from pytz.all_timezones (#1642003)
002329f
9206b33
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.5-2
9206b33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9206b33
568be6b
* Thu Aug 23 2018 Miro Hrončok <mhroncok@redhat.com> - 2018.5-1
568be6b
- Update to 2018.5 (#1508227)
568be6b
b75f883
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2017.2-10
b75f883
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b75f883
ea00abb
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2017.2-9
ea00abb
- Rebuilt for Python 3.7
ea00abb
2689a31
* Wed May 23 2018 Miro Hrončok <mhroncok@redhat.com> - 2017.2-8
2689a31
- Fix ambiguous shebangs
2689a31
9ad2da3
* Sat Mar 17 2018 Matěj Cepl <mcepl@redhat.com> - 2017.2-7
9ad2da3
- Switch __python for __python2 macro.
9ad2da3
3edecc0
* Sat Mar 17 2018 Matěj Cepl <mcepl@redhat.com> - 2017.2-6
3edecc0
- remove test_tzinfo.PicklingTest.testRoundtrip which fails with our
3edecc0
  system-wide timezone database (#1497572)
3edecc0
ffe82e4
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2017.2-5
ffe82e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ffe82e4
4f14c8b
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2017.2-4
4f14c8b
- Cleanup spec file conditionals
4f14c8b
9140438
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2017.2-3
9140438
- Python 2 binary package renamed to python2-pytz
9140438
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
9140438
2852ca8
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2017.2-2
2852ca8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2852ca8
Petr Šabata 5aa97d2
* Mon Jul 17 2017 Petr Šabata <contyk@redhat.com> - 2017.2-1
Petr Šabata 5aa97d2
- Update to 2017.2
Petr Šabata 5aa97d2
67de44e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.10-4
67de44e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
67de44e
8a88823
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 2016.10-3
8a88823
- Enable tests
8a88823
9474d2a
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2016.10-2
9474d2a
- Rebuild for Python 3.6
9474d2a
- Disable python3 tests for now
9474d2a
Orion Poplawski df6001e
* Tue Dec 6 2016 Orion Poplawski <orion@cora.nwra.com> - 2016.10-1
Orion Poplawski df6001e
- Update to 2016.10
Orion Poplawski df6001e
Orion Poplawski 29535d9
* Tue Nov 8 2016 Orion Poplawski <orion@cora.nwra.com> - 2016.7-1
Orion Poplawski 29535d9
- Update to 2016.7
Orion Poplawski 29535d9
40029e8
* Thu Jul 21 2016 Matěj Cepl <mcepl@redhat.com> - 2016.6.1-1
40029e8
- Update to 2016.6.1 (RHBZ #1356337)
40029e8
- Fix Source0 URL to override a change in PyPI URLs (see
40029e8
  https://bitbucket.org/pypa/pypi/issues/438/)
40029e8
9d2b575
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2016.4-3
9d2b575
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
9d2b575
Orion Poplawski e2a5df9
* Mon May 16 2016 Orion Poplawski <orion@cora.nwra.com> 2016.4-1
Orion Poplawski e2a5df9
- Use proper PYTHONPATH with python3 test
Orion Poplawski e2a5df9
- Use %%license
Orion Poplawski e2a5df9
- Drop BuildRoot and %%clean
Orion Poplawski e2a5df9
65cfcfa
* Sat Apr 23 2016 Matěj Cepl <mcepl@redhat.com> 2016.4-1
65cfcfa
- Update to 2016.4 (RHBZ #1265036)
65cfcfa
2de8cb7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015.7-3
2de8cb7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2de8cb7
Robert Kuska 8dd5b11
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 2015.7-2
Robert Kuska 8dd5b11
- Rebuilt for Python3.5 rebuild
Robert Kuska 8dd5b11
Orion Poplawski 1c0d3ad
* Mon Oct 26 2015 Orion Poplawski <orion@cora.nwra.com> - 2015.7-1
Orion Poplawski 1c0d3ad
- Update to 2015.7
Orion Poplawski 1c0d3ad
Orion Poplawski 5eac851
* Sun Aug 30 2015 Orion Poplawski <orion@cora.nwra.com> - 2015.4-1
Orion Poplawski 5eac851
- Update to 2015.4 (bug #1161236)
Orion Poplawski 5eac851
- Do not ship zoneinfo with python3 package (bug #1251554)
Orion Poplawski 5eac851
- Run tests
Orion Poplawski 5eac851
9775973
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012d-8
9775973
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9775973
ceedcc0
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012d-7
ceedcc0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ceedcc0
a9cfdb5
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2012d-6
a9cfdb5
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
a9cfdb5
b69bbee
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012d-5
b69bbee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b69bbee
c3e7176
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012d-4
c3e7176
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c3e7176
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