package/python-humanfriendly: new package

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Romain Naour <romain.naour@smile.fr>
Cc: James Hilliard <james.hilliard1@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
[Julien:
 - add DEVELOPERS entry
 - fix test class name
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Yann E. MORIN
2026-03-16 09:08:53 +01:00
committed by Julien Olivain
parent 49c1e1181f
commit e190962f3e
7 changed files with 46 additions and 0 deletions

View File

@@ -3456,6 +3456,7 @@ N: Yann E. MORIN <yann.morin@orange.com>
F: .editorconfig
F: package/gpsd/
F: package/mosquitto/
F: package/python-humanfriendly/
F: package/skopeo/
N: Yegor Yefremov <yegorslists@googlemail.com>

View File

@@ -1153,6 +1153,7 @@ menu "External python modules"
source "package/python-httplib2/Config.in"
source "package/python-httpx/Config.in"
source "package/python-huepy/Config.in"
source "package/python-humanfriendly/Config.in"
source "package/python-humanize/Config.in"
source "package/python-hwdata/Config.in"
source "package/python-hyperframe/Config.in"

View File

@@ -0,0 +1,7 @@
config BR2_PACKAGE_PYTHON_HUMANFRIENDLY
bool "python-humanfriendly"
depends on BR2_PACKAGE_PYTHON3
help
Human friendly input/output for text interfaces using Python.
https://github.com/xolox/python-humanfriendly/

View File

@@ -0,0 +1,3 @@
# From https://pypi.org/project/humanfriendly/#humanfriendly-10.0.tar.gz
sha256 6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc humanfriendly-10.0.tar.gz
sha256 4ac48f4117809f2734066150450f120b3bb110ac1d3b32170795e0560dbbc1f5 LICENSE.txt

View File

@@ -0,0 +1,16 @@
################################################################################
#
# python-humanfriendly
#
################################################################################
PYTHON_HUMANFRIENDLY_VERSION = 10.0
PYTHON_HUMANFRIENDLY_SOURCE = humanfriendly-$(PYTHON_HUMANFRIENDLY_VERSION).tar.gz
PYTHON_HUMANFRIENDLY_SITE = https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43
PYTHON_HUMANFRIENDLY_LICENSE = MIT
PYTHON_HUMANFRIENDLY_LICENSE_FILES = LICENSE.txt
PYTHON_HUMANFRIENDLY_SETUP_TYPE = setuptools
$(eval $(python-package))

View File

@@ -0,0 +1,6 @@
import humanfriendly as hf
h_size = "16MiB"
b_size = hf.parse_size(h_size)
assert b_size == 16*1024*1024

View File

@@ -0,0 +1,12 @@
from tests.package.test_python import TestPythonPackageBase
class TestPythonPy3HumanFriendly(TestPythonPackageBase):
__test__ = True
config = TestPythonPackageBase.config + \
"""
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_CURSES=y
BR2_PACKAGE_PYTHON_HUMANFRIENDLY=y
"""
sample_scripts = ["tests/package/sample_python_humanfriendly.py"]