pytz-vl.spec 6.1 KB

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