diff mbox series

[v2,2/3] package/python-rgbmatrix: new package

Message ID 20240901-rgbmatrix-v2-2-3a10c3c367e4@gmx.net
State Accepted
Headers show
Series Version bump and python bindings for rpi-rgb-led-matrix | expand

Commit Message

J. Neuschäfer Sept. 1, 2024, 2:29 p.m. UTC
The "rgbmatrix" python module is the Python binding for
rpi-rgb-led-matrix, built from the same source repository.

Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net>
---
 package/Config.in                                |  1 +
 package/python-rgbmatrix/Config.in               |  8 ++++++++
 package/python-rgbmatrix/python-rgbmatrix.hash   |  3 +++
 package/python-rgbmatrix/python-rgbmatrix.mk     | 24 ++++++++++++++++++++++++
 package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk |  1 +
 5 files changed, 37 insertions(+)


--
2.45.2

Comments

Yann E. MORIN Sept. 3, 2024, 9:44 p.m. UTC | #1
J., All,

On 2024-09-01 16:29 +0200, J. Neuschäfer via buildroot spake thusly:
> The "rgbmatrix" python module is the Python binding for
> rpi-rgb-led-matrix, built from the same source repository.
> 
> Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net>

I did a few changes:

  - add comment for propagated dependencies
  - add comment on missing dependencies
  - drop comment at end of _VERSION line

Applied to next, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/Config.in                                |  1 +
>  package/python-rgbmatrix/Config.in               |  8 ++++++++
>  package/python-rgbmatrix/python-rgbmatrix.hash   |  3 +++
>  package/python-rgbmatrix/python-rgbmatrix.mk     | 24 ++++++++++++++++++++++++
>  package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk |  1 +
>  5 files changed, 37 insertions(+)
> 
> diff --git a/package/Config.in b/package/Config.in
> index 07bd1499d8..b3665a7569 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1343,6 +1343,7 @@ menu "External python modules"
>  	source "package/python-requests-oauthlib/Config.in"
>  	source "package/python-requests-toolbelt/Config.in"
>  	source "package/python-rfc3987/Config.in"
> +	source "package/python-rgbmatrix/Config.in"
>  	source "package/python-rpds-py/Config.in"
>  	source "package/python-rpi-gpio/Config.in"
>  	source "package/python-rpi-ws281x/Config.in"
> diff --git a/package/python-rgbmatrix/Config.in b/package/python-rgbmatrix/Config.in
> new file mode 100644
> index 0000000000..3b39bd500c
> --- /dev/null
> +++ b/package/python-rgbmatrix/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_PYTHON_RGBMATRIX
> +	bool "python-rgbmatrix"
> +	depends on BR2_aarch64 || BR2_arm
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_PACKAGE_HOST_PYTHON_CYTHON
> +	select BR2_PACKAGE_RPI_RGB_LED_MATRIX
> diff --git a/package/python-rgbmatrix/python-rgbmatrix.hash b/package/python-rgbmatrix/python-rgbmatrix.hash
> new file mode 100644
> index 0000000000..175081eb5d
> --- /dev/null
> +++ b/package/python-rgbmatrix/python-rgbmatrix.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256  9a6da5b0ad730883a5fa18afc59b1297b4b05eb581c2c14ae50a3583296a4bed  python-rgbmatrix-f55736f7595bc028451658996eedea9742688bbc.tar.gz
> +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
> diff --git a/package/python-rgbmatrix/python-rgbmatrix.mk b/package/python-rgbmatrix/python-rgbmatrix.mk
> new file mode 100644
> index 0000000000..2bd5bc97b7
> --- /dev/null
> +++ b/package/python-rgbmatrix/python-rgbmatrix.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# python-rgbmatrix
> +#
> +################################################################################
> +
> +# When updating the version, please also update rpi-rgb-led-matrix
> +PYTHON_RGBMATRIX_VERSION = f55736f7595bc028451658996eedea9742688bbc  # 2024-08-18
> +PYTHON_RGBMATRIX_SITE = $(call github,hzeller,rpi-rgb-led-matrix,$(PYTHON_RGBMATRIX_VERSION))
> +PYTHON_RGBMATRIX_LICENSE = GPL-2.0
> +PYTHON_RGBMATRIX_LICENSE_FILES = COPYING
> +PYTHON_RGBMATRIX_INSTALL_STAGING = YES
> +PYTHON_RGBMATRIX_SETUP_TYPE = setuptools
> +PYTHON_RGBMATRIX_SUBDIR = bindings/python
> +PYTHON_RGBMATRIX_DEPENDENCIES = host-python-cython rpi-rgb-led-matrix
> +
> +# Generate bindings with cython
> +define PYTHON_RGBMATRIX_CYTHON
> +	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/bindings/python/rgbmatrix \
> +		CYTHON=$(HOST_DIR)/bin/cython all
> +endef
> +PYTHON_RGBMATRIX_PRE_BUILD_HOOKS += PYTHON_RGBMATRIX_CYTHON
> +
> +$(eval $(python-package))
> diff --git a/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk b/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk
> index 53408996a3..235927fa1c 100644
> --- a/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk
> +++ b/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk
> @@ -4,6 +4,7 @@
>  #
>  ################################################################################
> 
> +# When updating the version, please also update python-rgbmatrix
>  RPI_RGB_LED_MATRIX_VERSION = f55736f7595bc028451658996eedea9742688bbc  # 2024-08-18
>  RPI_RGB_LED_MATRIX_SITE = $(call github,hzeller,rpi-rgb-led-matrix,$(RPI_RGB_LED_MATRIX_VERSION))
>  RPI_RGB_LED_MATRIX_LICENSE = GPL-2.0
> 
> --
> 2.45.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
J. Neuschäfer Sept. 4, 2024, 12:04 p.m. UTC | #2
On Tue, Sep 03, 2024 at 11:44:49PM +0200, Yann E. MORIN wrote:
> J., All,
>
> On 2024-09-01 16:29 +0200, J. Neuschäfer via buildroot spake thusly:
> > The "rgbmatrix" python module is the Python binding for
> > rpi-rgb-led-matrix, built from the same source repository.
> >
> > Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net>
>
> I did a few changes:
>
>   - add comment for propagated dependencies
>   - add comment on missing dependencies
>   - drop comment at end of _VERSION line
>
> Applied to next, thanks.

Thanks for taking care of these things!

-- jn
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 07bd1499d8..b3665a7569 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1343,6 +1343,7 @@  menu "External python modules"
 	source "package/python-requests-oauthlib/Config.in"
 	source "package/python-requests-toolbelt/Config.in"
 	source "package/python-rfc3987/Config.in"
+	source "package/python-rgbmatrix/Config.in"
 	source "package/python-rpds-py/Config.in"
 	source "package/python-rpi-gpio/Config.in"
 	source "package/python-rpi-ws281x/Config.in"
diff --git a/package/python-rgbmatrix/Config.in b/package/python-rgbmatrix/Config.in
new file mode 100644
index 0000000000..3b39bd500c
--- /dev/null
+++ b/package/python-rgbmatrix/Config.in
@@ -0,0 +1,8 @@ 
+config BR2_PACKAGE_PYTHON_RGBMATRIX
+	bool "python-rgbmatrix"
+	depends on BR2_aarch64 || BR2_arm
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_HOST_PYTHON_CYTHON
+	select BR2_PACKAGE_RPI_RGB_LED_MATRIX
diff --git a/package/python-rgbmatrix/python-rgbmatrix.hash b/package/python-rgbmatrix/python-rgbmatrix.hash
new file mode 100644
index 0000000000..175081eb5d
--- /dev/null
+++ b/package/python-rgbmatrix/python-rgbmatrix.hash
@@ -0,0 +1,3 @@ 
+# Locally computed
+sha256  9a6da5b0ad730883a5fa18afc59b1297b4b05eb581c2c14ae50a3583296a4bed  python-rgbmatrix-f55736f7595bc028451658996eedea9742688bbc.tar.gz
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
diff --git a/package/python-rgbmatrix/python-rgbmatrix.mk b/package/python-rgbmatrix/python-rgbmatrix.mk
new file mode 100644
index 0000000000..2bd5bc97b7
--- /dev/null
+++ b/package/python-rgbmatrix/python-rgbmatrix.mk
@@ -0,0 +1,24 @@ 
+################################################################################
+#
+# python-rgbmatrix
+#
+################################################################################
+
+# When updating the version, please also update rpi-rgb-led-matrix
+PYTHON_RGBMATRIX_VERSION = f55736f7595bc028451658996eedea9742688bbc  # 2024-08-18
+PYTHON_RGBMATRIX_SITE = $(call github,hzeller,rpi-rgb-led-matrix,$(PYTHON_RGBMATRIX_VERSION))
+PYTHON_RGBMATRIX_LICENSE = GPL-2.0
+PYTHON_RGBMATRIX_LICENSE_FILES = COPYING
+PYTHON_RGBMATRIX_INSTALL_STAGING = YES
+PYTHON_RGBMATRIX_SETUP_TYPE = setuptools
+PYTHON_RGBMATRIX_SUBDIR = bindings/python
+PYTHON_RGBMATRIX_DEPENDENCIES = host-python-cython rpi-rgb-led-matrix
+
+# Generate bindings with cython
+define PYTHON_RGBMATRIX_CYTHON
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/bindings/python/rgbmatrix \
+		CYTHON=$(HOST_DIR)/bin/cython all
+endef
+PYTHON_RGBMATRIX_PRE_BUILD_HOOKS += PYTHON_RGBMATRIX_CYTHON
+
+$(eval $(python-package))
diff --git a/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk b/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk
index 53408996a3..235927fa1c 100644
--- a/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk
+++ b/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk
@@ -4,6 +4,7 @@ 
 #
 ################################################################################

+# When updating the version, please also update python-rgbmatrix
 RPI_RGB_LED_MATRIX_VERSION = f55736f7595bc028451658996eedea9742688bbc  # 2024-08-18
 RPI_RGB_LED_MATRIX_SITE = $(call github,hzeller,rpi-rgb-led-matrix,$(RPI_RGB_LED_MATRIX_VERSION))
 RPI_RGB_LED_MATRIX_LICENSE = GPL-2.0