From 5bdd01c3b3b1c415c71b00b2374538995f63597c Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Sun, 29 Apr 2018 11:40:58 +0800 Subject: Switch from python to python3 Python 2 will be EOL in 2020 so Python 3 is preferrable. See-also: https://pythonclock.org/ --- .install-rpm.sh | 2 +- iotop.py | 2 +- release.sh | 2 +- sbin/iotop | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.install-rpm.sh b/.install-rpm.sh index fc36db4..1ad62f8 100755 --- a/.install-rpm.sh +++ b/.install-rpm.sh @@ -2,7 +2,7 @@ # https://bugs.python.org/issue644744 -python setup.py install -O1 --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES +python3 setup.py install -O1 --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES # 'brp-compress' gzips the man pages without distutils knowing... fix this sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.gz@g' INSTALLED_FILES # actually, it doesn't on all distributions so just compress unconditionally diff --git a/iotop.py b/iotop.py index 13ed873..666c6b4 100755 --- a/iotop.py +++ b/iotop.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # iotop: Display I/O usage of processes in a top like UI # Copyright (c) 2007, 2008 Guillaume Chazarain # GPL version 2 or later diff --git a/release.sh b/release.sh index fa7c899..3923aef 100755 --- a/release.sh +++ b/release.sh @@ -6,7 +6,7 @@ set -e # Exit on error PACKAGE=$(basename "$PWD") mkdir dist TEMPDIR="$(mktemp -d)" -VERSION=$(python -c "from $PACKAGE.version import VERSION; print VERSION") +VERSION=$(python3 -c "from $PACKAGE.version import VERSION; print VERSION") echo "$PACKAGE-$VERSION: $TEMPDIR" mkdir "$TEMPDIR/$PACKAGE-$VERSION" git archive HEAD | (cd "$TEMPDIR/$PACKAGE-$VERSION" && tar vx) diff --git a/sbin/iotop b/sbin/iotop index c5202d3..bb23a6e 100755 --- a/sbin/iotop +++ b/sbin/iotop @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # iotop: Display I/O usage of processes in a top like UI # Copyright (c) 2007, 2008 Guillaume Chazarain , GPLv2 # See iotop --help for some help diff --git a/setup.py b/setup.py index 9de6068..e87bfaa 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from distutils.core import setup from distutils.command import install as distutils_install -- cgit v1.2.1