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