[11929] | 1 | %bcond_with check |
---|
[6435] | 2 | |
---|
[11929] | 3 | %define pathfix %{_libdir}/python3.5/Tools/scripts/pathfix.py |
---|
| 4 | |
---|
[6435] | 5 | Name: pytz |
---|
[11929] | 6 | Version: 2018.7 |
---|
[6435] | 7 | Release: 1%{?_dist_release} |
---|
| 8 | Summary: World Timezone Definitions for Python |
---|
| 9 | Summary(ja): Python 用の世界タイムゾーン定義 |
---|
| 10 | |
---|
| 11 | Group: Development/Languages |
---|
| 12 | License: MIT |
---|
| 13 | URL: http://pytz.sourceforge.net/ |
---|
[11929] | 14 | Vendor: Project Vine |
---|
| 15 | Distribution: Vine Linux |
---|
[6435] | 16 | |
---|
[11929] | 17 | Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz |
---|
| 18 | # Patch to use the system supplied zoneinfo files |
---|
| 19 | Patch0: pytz-zoneinfo.patch |
---|
| 20 | # https://bugzilla.redhat.com/1497572 |
---|
| 21 | Patch1: remove_tzinfo_test.patch |
---|
| 22 | |
---|
[6435] | 23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 24 | BuildArch: noarch |
---|
| 25 | |
---|
| 26 | %description |
---|
| 27 | pytz brings the Olson tz database into Python. This library allows accurate |
---|
| 28 | and cross platform timezone calculations using Python 2.3 or higher. It |
---|
| 29 | also solves the issue of ambiguous times at the end of daylight savings, |
---|
| 30 | which you can read more about in the Python Library Reference |
---|
| 31 | (datetime.tzinfo). |
---|
| 32 | |
---|
| 33 | Amost all (over 540) of the Olson timezones are supported. |
---|
| 34 | |
---|
[11929] | 35 | %package -n python-%{name} |
---|
| 36 | Summary: World Timezone Definitions for Python |
---|
| 37 | Summary(ja): Python 用の世界タイムゾーン定義 |
---|
| 38 | %{?python_provide:%python_provide python2-%{name}} |
---|
| 39 | BuildRequires: python-devel, python-rpm-macros |
---|
| 40 | %if %{with check} |
---|
| 41 | BuildRequires: python-pytest |
---|
| 42 | %endif |
---|
| 43 | Requires: tzdata |
---|
| 44 | # Remove before vl7 |
---|
| 45 | Provides: pytz = %{version}-%{release} |
---|
| 46 | Obsoletes: pytz < %{version}-%{release} |
---|
| 47 | |
---|
| 48 | %description -n python-%{name} |
---|
| 49 | pytz brings the Olson tz database into Python. This library allows accurate |
---|
| 50 | and cross platform timezone calculations using Python 2.3 or higher. It |
---|
| 51 | also solves the issue of ambiguous times at the end of daylight savings, |
---|
| 52 | which you can read more about in the Python Library Reference |
---|
| 53 | (datetime.tzinfo). |
---|
| 54 | |
---|
| 55 | Amost all (over 540) of the Olson timezones are supported. |
---|
| 56 | |
---|
| 57 | %package -n python3-%{name} |
---|
| 58 | Summary: World Timezone Definitions for Python |
---|
| 59 | Summary(ja): Python 用の世界タイムゾーン定義 |
---|
| 60 | %{?python_provide:%python_provide python3-%{name}} |
---|
| 61 | BuildRequires: python3-devel, python3-rpm-macros |
---|
| 62 | %if %{with check} |
---|
| 63 | BuildRequires: python3-pytest |
---|
| 64 | %endif |
---|
| 65 | Requires: tzdata |
---|
| 66 | |
---|
| 67 | %description -n python3-%{name} |
---|
| 68 | pytz brings the Olson tz database into Python. This library allows accurate |
---|
| 69 | and cross platform timezone calculations using Python 2.3 or higher. It |
---|
| 70 | also solves the issue of ambiguous times at the end of daylight savings, |
---|
| 71 | which you can read more about in the Python Library Reference |
---|
| 72 | (datetime.tzinfo). |
---|
| 73 | |
---|
| 74 | Amost all (over 540) of the Olson timezones are supported. |
---|
| 75 | |
---|
[6435] | 76 | %prep |
---|
[11929] | 77 | %autosetup -p1 |
---|
[6435] | 78 | |
---|
| 79 | %build |
---|
[11929] | 80 | %py_build |
---|
| 81 | %py3_build |
---|
[6435] | 82 | |
---|
| 83 | %install |
---|
| 84 | rm -rf $RPM_BUILD_ROOT |
---|
[11929] | 85 | %py_install |
---|
| 86 | rm -r %{buildroot}%{python_sitelib}/pytz/zoneinfo |
---|
| 87 | %{pathfix} -p -i %{__python} %{buildroot}%{python_sitelib} |
---|
[6435] | 88 | |
---|
[11929] | 89 | %py3_install |
---|
| 90 | rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo |
---|
| 91 | %{pathfix} -p -i %{__python3} %{buildroot}%{python3_sitelib} |
---|
| 92 | |
---|
| 93 | %if %{with check} |
---|
| 94 | %check |
---|
| 95 | PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v |
---|
| 96 | PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v |
---|
| 97 | %endif |
---|
| 98 | |
---|
[6435] | 99 | %clean |
---|
| 100 | rm -rf $RPM_BUILD_ROOT |
---|
| 101 | |
---|
| 102 | |
---|
[11929] | 103 | %files -n python-%{name} |
---|
[6435] | 104 | %defattr(-,root,root,-) |
---|
[11929] | 105 | %license LICENSE.txt |
---|
| 106 | %doc README.txt |
---|
[6435] | 107 | %{python_sitelib}/pytz/ |
---|
| 108 | %{python_sitelib}/*.egg-info |
---|
| 109 | |
---|
[11929] | 110 | %files -n python3-pytz |
---|
| 111 | %license LICENSE.txt |
---|
| 112 | %doc README.txt |
---|
| 113 | %{python3_sitelib}/pytz/ |
---|
| 114 | %{python3_sitelib}/*.egg-info |
---|
| 115 | |
---|
[6435] | 116 | %changelog |
---|
[11929] | 117 | * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2018.7-1 |
---|
| 118 | - new upstream release. |
---|
| 119 | - added python3 support. |
---|
| 120 | |
---|
[8897] | 121 | * Sat Aug 09 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2014.4-1 |
---|
| 122 | - initial build for VineSeed |
---|
| 123 | |
---|
[6435] | 124 | * Tue Jun 26 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2012c-1 |
---|
| 125 | - initial build for VineSeed |
---|
| 126 | |
---|
| 127 | * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2010h-5 |
---|
| 128 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
| 129 | |
---|
| 130 | * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2010h-4 |
---|
| 131 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
| 132 | |
---|
| 133 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2010h-3 |
---|
| 134 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
| 135 | |
---|
| 136 | * Mon Jun 28 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 2010h-2 |
---|
| 137 | - Define => global |
---|
| 138 | |
---|
| 139 | * Tue Apr 27 2010 Jon Ciesla <limb@jcomserv.net> - 2010h-1 |
---|
| 140 | - Update to current version, BZ 573252. |
---|
| 141 | |
---|
| 142 | * Mon Feb 01 2010 Jon Ciesla <limb@jcomserv.net> - 2009i-7 |
---|
| 143 | - Corrected Source0 URL, BZ 560168. |
---|
| 144 | |
---|
| 145 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2008i-6 |
---|
| 146 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
| 147 | |
---|
| 148 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2008i-5 |
---|
| 149 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 150 | |
---|
| 151 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2008i-4 |
---|
| 152 | - Rebuild for Python 2.6 |
---|
| 153 | |
---|
| 154 | * Tue Nov 18 2008 Jef Spaleta <jspaleta at fedoraproject dot org> 2008i-3 |
---|
| 155 | - Apply patch correctly. |
---|
| 156 | |
---|
| 157 | * Thu Nov 13 2008 Jef Spaleta <jspaleta at fedoraproject dot org> 2008i-2 |
---|
| 158 | - Updated tzdata patch from Petr Machata bug 471014 |
---|
| 159 | |
---|
| 160 | * Tue Nov 11 2008 Jef Spaleta <jspaleta at fedoraproject dot org> 2008i-1 |
---|
| 161 | - Update to latest, now using timezone files provided by tzdata package |
---|
| 162 | |
---|
| 163 | * Fri Jan 04 2008 Jef Spaleta <jspaleta@gmail.com> 2006p-3 |
---|
| 164 | - Fix for egg-info file creation |
---|
| 165 | |
---|
| 166 | * Mon Dec 11 2006 Jef Spaleta <jspaleta@gmail.com> 2006p-2 |
---|
| 167 | - Bump for rebuild against python 2.5 and change BR to python-devel accordingly |
---|
| 168 | |
---|
| 169 | * Fri Dec 8 2006 Orion Poplawski <orion@cora.nwra.com> 2006p-1 |
---|
| 170 | - Update to 2006p |
---|
| 171 | |
---|
| 172 | * Thu Sep 7 2006 Orion Poplawski <orion@cora.nwra.com> 2006g-1 |
---|
| 173 | - Update to 2006g |
---|
| 174 | |
---|
| 175 | * Mon Feb 13 2006 Orion Poplawski <orion@cora.nwra.com> 2005r-2 |
---|
| 176 | - Rebuild for gcc/glibc changes |
---|
| 177 | |
---|
| 178 | * Tue Jan 3 2006 Orion Poplawski <orion@cora.nwra.com> 2005r-1 |
---|
| 179 | - Update to 2005r |
---|
| 180 | |
---|
| 181 | * Thu Dec 22 2005 Orion Poplawski <orion@cora.nwra.com> 2005m-1 |
---|
| 182 | - Update to 2005m |
---|
| 183 | |
---|
| 184 | * Fri Jul 22 2005 Orion Poplawski <orion@cora.nwra.com> 2005i-2 |
---|
| 185 | - Remove -O1 from install command |
---|
| 186 | |
---|
| 187 | * Tue Jul 05 2005 Orion Poplawski <orion@cora.nwra.com> 2005i-1 |
---|
| 188 | - Initial Fedora Extras package |
---|