New upstream release and Python3 package version.

This commit is contained in:
Lumir Balhar 2016-06-08 10:33:57 +02:00 committed by Miro Hrončok
parent d4ae3f2546
commit 481a1678c7
2 changed files with 15 additions and 12 deletions

11
ps_mem.py Executable file → Normal file
View File

@ -36,7 +36,7 @@
# Patch from patrice.bouchand.fedora@gmail.com
# V1.9 20 Feb 2008 Fix invalid values reported when PSS is available.
# Reported by Andrey Borzenkov <arvidjaar@mail.ru>
# V3.5 29 Sep 2015
# V3.6 16 Oct 2015
# http://github.com/pixelb/scripts/commits/master/scripts/ps_mem.py
# Notes:
@ -438,9 +438,8 @@ def print_memory_usage(sorted_cmds, shareds, count, total):
def verify_environment():
if os.geteuid() != 0:
sys.stderr.write("Sorry, root permission required.\n")
if __name__ == '__main__':
sys.stderr.close()
sys.exit(1)
sys.stderr.close()
sys.exit(1)
try:
kv = kernel_ver()
@ -454,7 +453,7 @@ def verify_environment():
else:
raise
if __name__ == '__main__':
def main():
split_args, pids_to_show, watch, only_total = parse_options()
verify_environment()
@ -490,3 +489,5 @@ if __name__ == '__main__':
vm_accuracy = shared_val_accuracy()
show_shared_val_accuracy( vm_accuracy, only_total )
if __name__ == '__main__': main()

View File

@ -1,20 +1,18 @@
Name: ps_mem
Version: 3.5
Release: 2%{?dist}
Version: 3.6
Release: 1%{?dist}
Summary: Memory profiling tool
Group: Applications/System
License: LGPLv2
URL: https://github.com/pixelb/ps_mem
Source0: https://raw.github.com/pixelb/ps_mem/7e295aec/ps_mem.py
Source0: https://raw.githubusercontent.com/pixelb/ps_mem/c80287d/ps_mem.py
Source1: http://www.gnu.org/licenses/lgpl-2.1.txt
Source2: ps_mem.1
BuildArch: noarch
Requires: python
%description
The ps_mem tool reports how much core memory is used per program
@ -31,8 +29,8 @@ cp -p %{SOURCE0} %{name}
cp -p %{SOURCE1} LICENSE
cp -p %{SOURCE2} %{name}.1
# use system default python
sed -i "s|/usr/bin/env python|%{__python}|" %{name}
# use python3
sed -i "s|/usr/bin/env python|%{__python3}|" %{name}
touch -r %{SOURCE0} %{name}
@ -48,6 +46,10 @@ install -Dpm644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
%changelog
* Wed Jun 08 2016 Lumir Balhar <lbalhar@redhat.com> - 3.6-1
- Latest upstream release
- Package ported to Python3 with dependencies
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild