pytz-vl.spec 5.9 KB

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