public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/python-humanfriendly: new package
@ 2026-03-16  8:08 yann.morin
  2026-03-16 21:44 ` Julien Olivain via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: yann.morin @ 2026-03-16  8:08 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, yann.morin, James Hilliard, Thomas Petazzoni

From: "Yann E. MORIN" <yann.morin@orange.com>

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>

---
Changes v1 -> v2:
  - add runtime test  (Romain)
---
 package/Config.in                                |  1 +
 package/python-humanfriendly/Config.in           |  7 +++++++
 .../python-humanfriendly.hash                    |  3 +++
 .../python-humanfriendly/python-humanfriendly.mk | 16 ++++++++++++++++
 .../tests/package/sample_python_humanfriendly.py |  6 ++++++
 .../tests/package/test_python_humanfriendly.py   | 12 ++++++++++++
 6 files changed, 45 insertions(+)
 create mode 100644 package/python-humanfriendly/Config.in
 create mode 100644 package/python-humanfriendly/python-humanfriendly.hash
 create mode 100644 package/python-humanfriendly/python-humanfriendly.mk
 create mode 100644 support/testing/tests/package/sample_python_humanfriendly.py
 create mode 100644 support/testing/tests/package/test_python_humanfriendly.py

diff --git a/package/Config.in b/package/Config.in
index fab482c52f..49ff5e957c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/python-humanfriendly/Config.in b/package/python-humanfriendly/Config.in
new file mode 100644
index 0000000000..06197843b3
--- /dev/null
+++ b/package/python-humanfriendly/Config.in
@@ -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/
diff --git a/package/python-humanfriendly/python-humanfriendly.hash b/package/python-humanfriendly/python-humanfriendly.hash
new file mode 100644
index 0000000000..35f9395325
--- /dev/null
+++ b/package/python-humanfriendly/python-humanfriendly.hash
@@ -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
diff --git a/package/python-humanfriendly/python-humanfriendly.mk b/package/python-humanfriendly/python-humanfriendly.mk
new file mode 100644
index 0000000000..fcf3b47924
--- /dev/null
+++ b/package/python-humanfriendly/python-humanfriendly.mk
@@ -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))
diff --git a/support/testing/tests/package/sample_python_humanfriendly.py b/support/testing/tests/package/sample_python_humanfriendly.py
new file mode 100644
index 0000000000..31269a58f4
--- /dev/null
+++ b/support/testing/tests/package/sample_python_humanfriendly.py
@@ -0,0 +1,6 @@
+import humanfriendly as hf
+
+
+h_size = "16MiB"
+b_size = hf.parse_size(h_size)
+assert b_size == 16*1024*1024
diff --git a/support/testing/tests/package/test_python_humanfriendly.py b/support/testing/tests/package/test_python_humanfriendly.py
new file mode 100644
index 0000000000..adb317b014
--- /dev/null
+++ b/support/testing/tests/package/test_python_humanfriendly.py
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Crc(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"]
-- 
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2] package/python-humanfriendly: new package
  2026-03-16  8:08 [Buildroot] [PATCH v2] package/python-humanfriendly: new package yann.morin
@ 2026-03-16 21:44 ` Julien Olivain via buildroot
  2026-03-17  7:53   ` yann.morin
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-16 21:44 UTC (permalink / raw)
  To: yann.morin; +Cc: buildroot, Romain Naour, James Hilliard, Thomas Petazzoni

On 16/03/2026 09:08, yann.morin@orange.com wrote:
> From: "Yann E. MORIN" <yann.morin@orange.com>
> 
> 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>

Applied to master, thanks.

I also added the DEVELOPERS entry, since you said in [1] you
forgot to add it. I also fixed the test class name. See [2].

Best regards,

Julien.

[1] https://lore.kernel.org/buildroot/abe8BzQSq4cxvEw1@yd-6wlzhs3/
[2] 
https://gitlab.com/buildroot.org/buildroot/-/commit/e190962f3e7d27e6831e3c2e5e81d66fb4e55b40
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2] package/python-humanfriendly: new package
  2026-03-16 21:44 ` Julien Olivain via buildroot
@ 2026-03-17  7:53   ` yann.morin
  0 siblings, 0 replies; 3+ messages in thread
From: yann.morin @ 2026-03-17  7:53 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot, Romain Naour, James Hilliard, Thomas Petazzoni

Julien, All,

On 2026-03-16 22:44 +0100, Julien Olivain spake thusly:
> Applied to master, thanks.
> I also added the DEVELOPERS entry, since you said in [1] you
> forgot to add it. I also fixed the test class name. See [2].

Ah, damned. Thanks!

Regards,
Yann E. MORIN.

-- 
                                        ____________
.-----------------.--------------------:       _    :------------------.
|  Yann E. MORIN  | Real-Time Embedded |    __/ )   | /"\ ASCII RIBBON |
|                 | Software  Designer |  _/ - /'   | \ / CAMPAIGN     |
| +33 638.411.245 '--------------------: (_    `--, |  X  AGAINST      |
| yann.morin (at) orange.com           |_="    ,--' | / \ HTML MAIL    |
'--------------------------------------:______/_____:------------------'

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-17  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16  8:08 [Buildroot] [PATCH v2] package/python-humanfriendly: new package yann.morin
2026-03-16 21:44 ` Julien Olivain via buildroot
2026-03-17  7:53   ` yann.morin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox