From: "Alexis Lothoré via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "James Hilliard" <james.hilliard1@gmail.com>,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
"Nicolas Carrier" <nicolas.carrier@nav-timing.safrangroup.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 1/2] package/python-gevent: new package
Date: Tue, 10 Feb 2026 22:01:55 +0100 [thread overview]
Message-ID: <20260210-python-packages-v1-1-6153f56421d4@bootlin.com> (raw)
In-Reply-To: <20260210-python-packages-v1-0-6153f56421d4@bootlin.com>
Bring python-gevent module as a standalone package.
Set GEVENTSETUP_EMBED=0 to prevent python-gevent from using its embedded
libuv, libev and c-ares and rather use those packaged with buildroot.
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/python-gevent/Config.in | 19 +++++++++++++++++++
package/python-gevent/python-gevent.hash | 5 +++++
package/python-gevent/python-gevent.mk | 16 ++++++++++++++++
support/testing/tests/package/sample_python_gevent.py | 7 +++++++
support/testing/tests/package/test_python_gevent.py | 12 ++++++++++++
7 files changed, 61 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 225d1ac917dc..cc7c38c31873 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -155,6 +155,7 @@ N: Alexey Lukyanchuk <skif@skif-web.ru>
F: package/zabbix/
N: Alexis Lothoré <alexis.lothore@bootlin.com>
+F: package/python-gevent
F: package/python-scp
N: Alistair Francis <alistair@alistair23.me>
diff --git a/package/Config.in b/package/Config.in
index 6284bea7f4ad..76c2a4365513 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1127,6 +1127,7 @@ menu "External python modules"
source "package/python-fonttools/Config.in"
source "package/python-frozenlist/Config.in"
source "package/python-future/Config.in"
+ source "package/python-gevent/Config.in"
source "package/python-git/Config.in"
source "package/python-gitdb2/Config.in"
source "package/python-gnupg/Config.in"
diff --git a/package/python-gevent/Config.in b/package/python-gevent/Config.in
new file mode 100644
index 000000000000..af7a97a49ce3
--- /dev/null
+++ b/package/python-gevent/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_PYTHON_GEVENT
+ bool "python-gevent"
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++20
+ select BR2_PACKAGE_C_ARES # runtime
+ select BR2_PACKAGE_LIBEV # runtime
+ select BR2_PACKAGE_LIBUV # runtime
+ select BR2_PACKAGE_HOST_PYTHON_CYTHON # build time
+ select BR2_PACKAGE_HOST_PYTHON_GREENLET # build time
+ select BR2_PACKAGE_HOST_PYTHON_CFFI # build time
+ select BR2_PACKAGE_PYTHON_GREENLET # runtime
+ select BR2_PACKAGE_PYTHON_ZOPEEVENT # runtime
+ select BR2_PACKAGE_PYTHON_ZOPE_INTERFACE # runtime
+ help
+ Coroutine-based network library.
+
+ http://www.gevent.org/
+
+comment "python-gevent needs a toolchain w/ C++, gcc >= 8"
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
diff --git a/package/python-gevent/python-gevent.hash b/package/python-gevent/python-gevent.hash
new file mode 100644
index 000000000000..4356972ddd50
--- /dev/null
+++ b/package/python-gevent/python-gevent.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/gevent/json
+md5 a415693013e79df4c88a9e5fc90254bc gevent-25.9.1.tar.gz
+sha256 adf9cd552de44a4e6754c51ff2e78d9193b7fa6eab123db9578a210e657235dd gevent-25.9.1.tar.gz
+# Locally computed sha256 checksums
+sha256 4d46bc11d19e3853d54325973b8e2c53090f5638a7bf27fa1f5f1232c78901f7 LICENSE
diff --git a/package/python-gevent/python-gevent.mk b/package/python-gevent/python-gevent.mk
new file mode 100644
index 000000000000..10ddc895f74b
--- /dev/null
+++ b/package/python-gevent/python-gevent.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# python-gevent
+#
+################################################################################
+
+PYTHON_GEVENT_VERSION = 25.9.1
+PYTHON_GEVENT_SOURCE = gevent-$(PYTHON_GEVENT_VERSION).tar.gz
+PYTHON_GEVENT_SITE = https://files.pythonhosted.org/packages/9e/48/b3ef2673ffb940f980966694e40d6d32560f3ffa284ecaeb5ea3a90a6d3f
+PYTHON_GEVENT_SETUP_TYPE = setuptools
+PYTHON_GEVENT_DEPENDENCIES = libev libuv host-python-greenlet host-python-cffi host-python-cython
+PYTHON_GEVENT_LICENSE = MIT
+PYTHON_GEVENT_LICENSE_FILES = LICENSE
+PYTHON_GEVENT_ENV = GEVENTSETUP_EMBED=0
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_gevent.py b/support/testing/tests/package/sample_python_gevent.py
new file mode 100644
index 000000000000..e8f065c17e88
--- /dev/null
+++ b/support/testing/tests/package/sample_python_gevent.py
@@ -0,0 +1,7 @@
+# Example taken from the official documentation
+import gevent
+from gevent import socket
+
+urls = ['www.google.com', 'www.example.com', 'www.python.org']
+jobs = [gevent.spawn(socket.gethostbyname, url) for url in urls]
+_ = gevent.joinall(jobs, timeout=2)
diff --git a/support/testing/tests/package/test_python_gevent.py b/support/testing/tests/package/test_python_gevent.py
new file mode 100644
index 000000000000..567cae182d2b
--- /dev/null
+++ b/support/testing/tests/package/test_python_gevent.py
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonGevent(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_GEVENT=y
+ """
+ sample_scripts = ["tests/package/sample_python_gevent.py"]
+ timeout = 30
--
2.52.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-02-10 21:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 21:01 [Buildroot] [PATCH 0/2] package: add new python packages Alexis Lothoré via buildroot
2026-02-10 21:01 ` Alexis Lothoré via buildroot [this message]
2026-02-10 21:01 ` [Buildroot] [PATCH 2/2] package/python-flask-socketio: new package Alexis Lothoré via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260210-python-packages-v1-1-6153f56421d4@bootlin.com \
--to=buildroot@buildroot.org \
--cc=alexis.lothore@bootlin.com \
--cc=james.hilliard1@gmail.com \
--cc=nicolas.carrier@nav-timing.safrangroup.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox