mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
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]
This commit is contained in:
parent
7a4e2e094d
commit
70ad9ca62c
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user