python-pid-vl.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. %global srcname pid
  2. %global common_description %{expand:
  3. pid provides a PidFile class that manages PID files. PidFile features:
  4. - stale detection
  5. - locking using fcntl
  6. - chmod (default is 0o644)
  7. - chown
  8. - custom exceptions
  9. PidFile can also be used as a context manager or a decorator.}
  10. %bcond_with python2
  11. # nose is too old
  12. %bcond_with python2_tests
  13. %bcond_without python3
  14. %bcond_with python3_tests
  15. Name: python-%{srcname}
  16. Version: 3.0.4
  17. Release: 1%{?_dist_release}
  18. Summary: PID file management library
  19. Group: programming
  20. Vendor: Project Vine
  21. Distribution: Vine Linux
  22. License: ASL 2.0
  23. URL: https://github.com/trbs/pid
  24. Source0: https://github.com/trbs/pid/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
  25. BuildArch: noarch
  26. %description %{common_description}
  27. %if %{with python2}
  28. BuildRequires: python-devel
  29. BuildRequires: python-setuptools
  30. BuildRequires: python-rpm-macros
  31. %if %{with python2_tests}
  32. BuildRequires: python-nose >= 1.0
  33. BuildRequires: python-mock
  34. %endif
  35. %{?python_provide:%python_provide python2-%{srcname}}
  36. %endif
  37. %if %{with python3}
  38. %package -n python3-%{srcname}
  39. Summary: %{summary}
  40. Group: programming
  41. BuildRequires: python3-devel
  42. BuildRequires: python3-setuptools
  43. BuildRequires: python3-rpm-macros
  44. %if %{with python3_tests}
  45. BuildRequires: python3-nose >= 1.0
  46. %endif
  47. %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
  48. %description -n python%{python3_pkgversion}-%{srcname} %{common_description}
  49. %endif
  50. %prep
  51. # This needs to have a blank line after because of a bug in the EL6 macros
  52. %autosetup -p1 -n %{srcname}-%{version}
  53. rm -rf %{srcname}.egg-info
  54. %build
  55. %if %{with python2}
  56. %py_build
  57. %endif
  58. %if %{with python3}
  59. %py3_build
  60. %endif
  61. %install
  62. %if %{with python2}
  63. %py_install
  64. %endif
  65. %if %{with python3}
  66. %py3_install
  67. %endif
  68. %check
  69. %if %{with python2_tests}
  70. PYTHONPATH=%{buildroot}%{python_sitelib} nosetests-%{python_version} --verbose
  71. %endif
  72. %if %{with python3_tests}
  73. PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} --verbose
  74. %endif
  75. %if %{with python2}
  76. %files
  77. %license LICENSE
  78. %doc AUTHORS CHANGELOG README.rst
  79. %{python_sitelib}/%{srcname}
  80. %{python_sitelib}/%{srcname}-%{version}-*.egg-info
  81. %endif
  82. %if %{with python3}
  83. %files -n python%{python3_pkgversion}-%{srcname}
  84. %license LICENSE
  85. %doc AUTHORS CHANGELOG README.rst
  86. %{python3_sitelib}/%{srcname}
  87. %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
  88. %endif
  89. %changelog
  90. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.4-1
  91. - new upstream release.
  92. * Mon Sep 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.2.3-5
  93. - initial build for Vine Linux.
  94. * Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.3-4
  95. - Rebuilt for Python 3.8
  96. * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
  97. - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
  98. * Fri Mar 08 2019 Troy Dawson <tdawson@redhat.com> - 2.2.3-2
  99. - Rebuilt to change main python from 3.4 to 3.6
  100. * Tue Mar 05 2019 Carl George <carl@george.computer> - 2.2.3-1
  101. - Latest upstream
  102. - Build python3 subpackage on el6
  103. - Run tests correctly
  104. * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-10
  105. - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
  106. * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-9
  107. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  108. * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.1-8
  109. - Rebuilt for Python 3.7
  110. * Thu Mar 22 2018 David Shea <dshea@redhat.com> - 2.1.1-7
  111. - Remove the python2 package
  112. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-6
  113. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  114. * Sat Jan 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.1.1-5
  115. - Update Python 2 dependency declarations to new packaging standards
  116. (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
  117. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-4
  118. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  119. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-3
  120. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  121. * Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 2.1.1-2
  122. - Rebuild for Python 3.6
  123. * Tue Nov 29 2016 David Shea <dshea@redhat.com> - 2.1.1-1
  124. - Update to 2.1.1, which adds an optional allow_samepid parameter
  125. * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-5
  126. - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
  127. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4
  128. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  129. * Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 2.0.1-3
  130. - Rebuilt for Python3.5 rebuild
  131. * Wed Aug 05 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.0.1-2
  132. - Update to modern python packaging guidelines
  133. * Tue Aug 4 2015 David Shea <dshea@redhat.com> - 2.0.1-1
  134. - Initial package