mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 07:10:05 +02:00
No need to have this for multiple versions of Python, as this is just a cli program/tool. This is still technically version 2.1.3 (no new release yet), but with a patch that adds a commit from upstream, which adds Python 3.10 support.
62 lines
1.8 KiB
Bash
62 lines
1.8 KiB
Bash
SUMMARY="A CLI for testing internet bandwidth using speedtest.net"
|
|
DESCRIPTION="speedtest-cli is a command-line interface for testing internet \
|
|
bandwidth using speedtest.net. Note that latency reported by this tool should \
|
|
not be relied on as a value indicative of ICMP style latency; rather, it is a \
|
|
relative value used for determining the lowest latency server for performing \
|
|
the actual speed test against.
|
|
Also note that its results may also be inconsistent with speedtest.net due to \
|
|
the website's migration to using pure socket tests instead of HTTP based ones, \
|
|
the application being written in Python, \
|
|
differing performance between Python versions, \
|
|
and CPU and Memory capacity and speed."
|
|
HOMEPAGE="https://github.com/sivel/speedtest-cli"
|
|
COPYRIGHT="2012-2021 Matt Martz"
|
|
LICENSE="Apache v2"
|
|
REVISION="2"
|
|
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="45e3ca21c3ce3c339646100de18db8a26a27d240c29f1c9e07b6c13995a969be"
|
|
SOURCE_FILENAME="speedtest-cli-$portVersion.tar.gz"
|
|
SOURCE_DIR="speedtest-cli-$portVersion"
|
|
PATCHES="0001-Python-3.10-support.patch"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
# Ideally should match Haiku's default Python version.
|
|
pythonVersion=3.10
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
cmd:speedtest_cli
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
cmd:python$pythonVersion
|
|
"
|
|
|
|
REPLACES="
|
|
speedtest_cli_python39
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:python$pythonVersion
|
|
"
|
|
|
|
INSTALL()
|
|
{
|
|
python=python$pythonVersion
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer -p $prefix dist/*.whl
|
|
|
|
# Package installs both bin/speedtest and speedtest-cli.
|
|
# Keep only the latter to match the package name.
|
|
rm $binDir/speedtest
|
|
}
|