From c37116f63cc3cd7148c3bad0fe1b6dc2f5ca9783 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 5 Apr 2018 14:39:18 +0200 Subject: [PATCH] iotop: switch to python3. --- srcpkgs/iotop/patches/python3.patch | 20 ++++++++++++++++++++ srcpkgs/iotop/template | 9 ++++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/iotop/patches/python3.patch diff --git a/srcpkgs/iotop/patches/python3.patch b/srcpkgs/iotop/patches/python3.patch new file mode 100644 index 0000000000..c496b42532 --- /dev/null +++ b/srcpkgs/iotop/patches/python3.patch @@ -0,0 +1,20 @@ +--- setup.py.orig ++++ setup.py +@@ -1,16 +1,9 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from distutils.core import setup + from distutils.command import install as distutils_install + from iotop.version import VERSION + +-# Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/ +-# while still honoring the choice of installing into local/ or not. +-if hasattr(distutils_install, 'INSTALL_SCHEMES'): +- for d in distutils_install.INSTALL_SCHEMES.itervalues(): +- if d.get('scripts', '').endswith('/bin'): +- d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin' +- + setup(name='iotop', + version=VERSION, + description='Per process I/O bandwidth monitor', diff --git a/srcpkgs/iotop/template b/srcpkgs/iotop/template index 0b1d116057..373832345e 100644 --- a/srcpkgs/iotop/template +++ b/srcpkgs/iotop/template @@ -1,10 +1,10 @@ # Template file for 'iotop' pkgname=iotop version=0.6 -revision=4 -noarch="yes" -build_style=python2-module -hostmakedepends="python" +revision=5 +noarch=yes +build_style=python3-module +hostmakedepends="python3" depends="${hostmakedepends}" pycompile_module="iotop" short_desc="View I/O usage of processes" @@ -15,6 +15,5 @@ distfiles="http://guichaz.free.fr/iotop/files/iotop-${version}.tar.bz2" checksum=3adea2a24eda49bbbaeb4e6ed2042355b441dbd7161e883067a02bfc8dcef75b post_install() { - mv ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin chmod 644 ${DESTDIR}/usr/share/man/man8/iotop.8 }