python-psutil-vl.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. %{!?__python3:%global __python3 /usr/bin/python3}
  2. %{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
  3. %{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
  4. %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  5. %{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
  6. %{!?__python2:%global __python2 %{__python}}
  7. %define py2_setup setup.py
  8. %define py2_shbang_opts -s
  9. %define py2_build() %{expand:\
  10. CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?1}\
  11. }
  12. %define py2_install() %{expand:\
  13. CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
  14. }
  15. %define py3_setup setup.py
  16. %define py3_shbang_opts -s
  17. %define py3_build() %{expand:\
  18. CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?1}\
  19. }
  20. %define py3_install() %{expand:\
  21. CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
  22. }
  23. %global srcname psutil
  24. %global sum A process and system utilities module for Python
  25. %global sum_ja Python用のプロセス・システムユーティリティ
  26. # Filter Python modules from Provides
  27. %global __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\\.so$
  28. Name: python-%{srcname}
  29. Version: 4.3.0
  30. Release: 2%{?_dist_release}
  31. Summary: %{sum}
  32. Summary(ja): %{sum_ja}
  33. License: BSD
  34. URL: https://github.com/giampaolo/psutil
  35. Vendor: Project Vine
  36. Distribution: Vine Linux
  37. Source0: https://github.com/giampaolo/psutil/archive/release-%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
  38. Provides: python2-%{srcname}
  39. BuildRequires: python-devel
  40. BuildRequires: python3-devel
  41. %description
  42. psutil is a module providing an interface for retrieving information on all
  43. running processes and system utilization (CPU, memory, disks, network, users) in
  44. a portable way by using Python, implementing many functionalities offered by
  45. command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
  46. ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
  47. %package -n python3-psutil
  48. Summary: %{sum}
  49. Summary(ja): %{sum_ja}
  50. %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
  51. %description -n python3-psutil
  52. psutil is a module providing an interface for retrieving information on all
  53. running processes and system utilization (CPU, memory, disks, network, users) in
  54. a portable way by using Python 3, implementing many functionalities offered by
  55. command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
  56. ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
  57. %prep
  58. %autosetup -p1 -n %{srcname}-release-%{version}
  59. # Remove shebangs
  60. find psutil -name \*.py | while read file; do
  61. sed -i.orig -e '1{/^#!/d}' $file && \
  62. touch -r $file.orig $file && \
  63. rm $file.orig
  64. done
  65. %build
  66. %py2_build
  67. %py3_build
  68. %install
  69. %py2_install
  70. %py3_install
  71. %files
  72. %license LICENSE
  73. %doc CREDITS HISTORY.rst README.rst
  74. %{python_sitearch}/%{srcname}/
  75. %{python_sitearch}/*.egg-info
  76. %files -n python3-%{srcname}
  77. %license LICENSE
  78. %doc CREDITS HISTORY.rst README.rst
  79. %{python3_sitearch}/%{srcname}/
  80. %{python3_sitearch}/*.egg-info
  81. %changelog
  82. * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.3.0-2
  83. - initial build for Vine Linux.
  84. * Tue Jun 21 2016 Orion Poplawski <orion@cora.nwra.com> - 4.3.0-1
  85. - Update to 4.3.0
  86. * Mon May 16 2016 Orion Poplawski <orion@cora.nwra.com> - 3.2.1-6
  87. - Use modern provides filter
  88. - Update URL
  89. - Use %%python3_pkgversion for EPEL7 compat
  90. * Fri Mar 11 2016 Than Ngo <than@redhat.com> - 3.2.1-5
  91. - fix endian issue on s390x/ppc64
  92. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-4
  93. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  94. * Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-3
  95. - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
  96. * Fri Sep 4 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.2.1-2
  97. - Add Obsoletes for old package
  98. * Fri Sep 4 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.2.1-1
  99. - Update to 3.2.1
  100. - Update to latest Python guidelines (https://fedorahosted.org/fpc/ticket/281)
  101. * Wed Jul 22 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.1.1-2
  102. - Restore *.so files
  103. - Enable tests
  104. * Tue Jul 21 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.1.1-1
  105. - Update to 3.1.1
  106. * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
  107. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  108. * Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 2.2.0-1
  109. - new version
  110. * Wed Dec 3 2014 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.1.3-1
  111. - Update to 2.1.3
  112. * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-5
  113. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  114. * Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.2.1-4
  115. - fix license handling
  116. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-3
  117. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  118. * Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.2.1-2
  119. - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
  120. * Mon Jan 06 2014 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.1-1
  121. - Update to 1.2.1
  122. * Fri Aug 16 2013 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.0.1-1
  123. - Update to 1.0.1
  124. * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-2
  125. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  126. * Sun May 12 2013 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.7.1-1
  127. - Update to 0.7.1
  128. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
  129. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  130. * Sun Aug 19 2012 Mohamed El Morabity <melmorabity@fedorapeople.org> - 0.6.1-1
  131. - Update to 0.6.1
  132. * Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.5.1-3
  133. - rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
  134. * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
  135. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  136. * Sun Jul 01 2012 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.5.1-1
  137. - Update to 0.5.1
  138. * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
  139. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  140. * Fri Dec 16 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.1-1
  141. - Update to 0.4.1
  142. * Sun Nov 20 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.0-1
  143. - Update to 0.4.0
  144. * Mon Jul 18 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.3.0-1
  145. - Update to 0.3.0
  146. * Wed Mar 23 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.2.1-1
  147. - Update to 0.2.1
  148. - Spec cleanup
  149. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
  150. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  151. * Mon Nov 22 2010 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.2.0-1
  152. - Update to 0.2.0
  153. * Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.3-5
  154. - rebuild with python3.2
  155. http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
  156. * Fri Jul 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.3-4
  157. - bump, because previous build nvr already existed in F-14
  158. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.1.3-3
  159. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  160. * Tue Apr 13 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.3-2
  161. - Add missing popd in %%build
  162. * Sat Mar 27 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.3-1
  163. - Update to 0.1.3
  164. - Remove useless call to 2to3 and corresponding BuildRequires
  165. python2-tools (this version supports Python 3)
  166. * Sat Feb 20 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-4
  167. - Change python-utils BuildRequires for python2-utils
  168. * Sat Feb 20 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-3
  169. - Add python3 subpackage
  170. * Thu Jan 14 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-2
  171. - Drop no-shebang patch for a sed command
  172. - Drop test suite from %%doc tag
  173. * Fri Jan 8 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-1
  174. - Initial RPM release