aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Maxwell <keith.maxwell@gmail.com>2020-04-12 09:35:49 +0100
committerKeith Maxwell <keith.maxwell@gmail.com>2020-04-12 09:38:03 +0100
commit70ad9ca62caa9cf7edf67300da0bebc4e8f356d0 (patch)
tree58f03c11be786f0c053bca634a11ac358e046f6e
parent7a4e2e094d67afc8d31d86fe27cbe6ebfd0107ac (diff)
downloadaports-70ad9ca62caa9cf7edf67300da0bebc4e8f356d0.tar.gz
aports-70ad9ca62caa9cf7edf67300da0bebc4e8f356d0.tar.bz2
aports-70ad9ca62caa9cf7edf67300da0bebc4e8f356d0.tar.xz
main/speedtest-cli: fix command line scripts
Before this change: $ dabuild sh $ sudo apk add speedtest-cli >/dev/null && speedtest-cli --version env: can't execute 'python': No such file or directory $ speedtest --version Traceback (most recent call last): File "/usr/bin/speedtest", line 6, in <module> from pkg_resources import load_entry_point ModuleNotFoundError: No module named 'pkg_resources' This change removes the specific install line for speedtest-cli, because it leaves a broken shebang first line. setup.py already installs a speedtest-cli script which a functional shebang line. This change adds py3-setuptools as a runtime dependency because pkg_resources is imported by a file installed into /usr/bin/: $ grep pkg_resources /usr/bin/speedtest from pkg_resources import load_entry_point pkg_resources is part of py3-setuptools: $ apk info -L py3-setuptools | grep pkg_resources/__init__.py usr/lib/python3.8/site-packages/pkg_resources/__init__.py After this change: $ dabuild sh $ sudo apk add speedtest-cli >/dev/null && speedtest-cli --version speedtest-cli 2.1.2 Python 3.8.2 (default, Apr 9 2020, 21:05:08) [GCC 9.3.0] $ speedtest --version speedtest-cli 2.1.2 Python 3.8.2 (default, Apr 9 2020, 21:05:08) [GCC 9.3.0]
-rw-r--r--main/speedtest-cli/APKBUILD6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/speedtest-cli/APKBUILD b/main/speedtest-cli/APKBUILD
index 31fa952742..0fc9d2ad5d 100644
--- a/main/speedtest-cli/APKBUILD
+++ b/main/speedtest-cli/APKBUILD
@@ -2,13 +2,12 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=speedtest-cli
pkgver=2.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="Command line interface for testing internet bandwidth using speedtest.net"
url="https://github.com/sivel/speedtest-cli"
arch="noarch"
license="Apache-2.0"
-depends="python3"
-makedepends="py3-setuptools"
+depends="python3 py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/sivel/speedtest-cli/archive/v$pkgver.tar.gz"
build() {
@@ -21,7 +20,6 @@ check() {
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
- install -Dm755 speedtest.py "$pkgdir"/usr/bin/speedtest-cli
}
sha512sums="f2eb125116f42075d3248e1c0590cce4f822f383ff7c54c158504b16de72bf35b35d55a78014413a95a5f5bafa98c71c3ea011f20f480f1db272d6e8800c40bd speedtest-cli-2.1.2.tar.gz"