diff mbox series

[v3] package/targetcli-fb: needs python-gobject

Message ID 20240312201413.781109-1-jeremy@jeremypeper.com
State Accepted
Headers show
Series [v3] package/targetcli-fb: needs python-gobject | expand

Commit Message

Jeremy J. Peper March 12, 2024, 8:14 p.m. UTC
add python-gobject to resolve "ModuleNotFoundError: No module named 'gi'" error encountered if built without it.
add python-gobject's dependencies as well
and comments to that effect

Signed-off-by: Jeremy J. Peper <jeremy@jeremypeper.com>
---
 package/targetcli-fb/Config.in       | 13 ++++++++++++-
 package/targetcli-fb/targetcli-fb.mk |  2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)

Comments

Adam Duskett March 12, 2024, 11:46 p.m. UTC | #1
Reviewed-by: Adam Duskett <adam.duskett@amarulasolutions.com>



On Tue, Mar 12, 2024 at 1:14 PM Jeremy J. Peper <jeremy@jeremypeper.com> wrote:
>
> add python-gobject to resolve "ModuleNotFoundError: No module named 'gi'" error encountered if built without it.
> add python-gobject's dependencies as well
> and comments to that effect
>
> Signed-off-by: Jeremy J. Peper <jeremy@jeremypeper.com>
> ---
>  package/targetcli-fb/Config.in       | 13 ++++++++++++-
>  package/targetcli-fb/targetcli-fb.mk |  2 +-
>  2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/package/targetcli-fb/Config.in b/package/targetcli-fb/Config.in
> index 04c6a1ac..57b1a7cd 100644
> --- a/package/targetcli-fb/Config.in
> +++ b/package/targetcli-fb/Config.in
> @@ -1,12 +1,23 @@
> -comment "targetcli-fb depends on Python"
> +comment "targetcli-fb depends on Python, needs a glibc toolchain, gcc >= 4.9, host gcc >= 8"
>         depends on !BR2_PACKAGE_PYTHON3
> +       depends on BR2_USE_MMU
> +       depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
> +       depends on !BR2_TOOLCHAIN_USES_GLIBC || \
> +               !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
> +               !BR2_HOST_GCC_AT_LEAST_8
>
>  config BR2_PACKAGE_TARGETCLI_FB
>         bool "targetcli-fb"
>         depends on BR2_PACKAGE_PYTHON3 # python-configshell-fb
> +       depends on BR2_USE_MMU # python-gobject
> +       depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS # python-gobject
> +       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # python-gobject
> +       depends on BR2_HOST_GCC_AT_LEAST_8 # python-gobject
> +       depends on BR2_TOOLCHAIN_USES_GLIBC # python-gobject
>         select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB
>         select BR2_PACKAGE_PYTHON_RTSLIB_FB
>         select BR2_PACKAGE_PYTHON_SIX
> +       select BR2_PACKAGE_PYTHON_GOBJECT
>         help
>           targetcli-fb is a command-line interface for configuring the
>           LIO generic SCSI target, present in 3.x Linux kernel
> diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk
> index d2cbf79e..dbe36e59 100644
> --- a/package/targetcli-fb/targetcli-fb.mk
> +++ b/package/targetcli-fb/targetcli-fb.mk
> @@ -12,7 +12,7 @@ TARGETCLI_FB_LICENSE = Apache-2.0
>  TARGETCLI_FB_LICENSE_FILES = COPYING
>  TARGETCLI_FB_CPE_ID_VALID = YES
>  TARGETCLI_FB_SETUP_TYPE = setuptools
> -TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six
> +TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six python-gobject
>
>  define TARGETCLI_FB_INSTALL_INIT_SYSV
>         $(INSTALL) -m 0755 -D package/targetcli-fb/S50target \
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle March 15, 2024, 8:22 p.m. UTC | #2
Hi Jeremy,

  Thank you for your contribution! I've made a few minor changes (see below) and 
applied to master, thanks! You can look at [1] to see what it ended up as.

  And thank you Adam for your effective review!


On 12/03/2024 21:14, Jeremy J. Peper wrote:
> add python-gobject to resolve "ModuleNotFoundError: No module named 'gi'" error encountered if built without it.

  The commit message should be wrapped at 72 columns. I ended up rewriting the 
commit message completely to fit more with how we usually write them.

> add python-gobject's dependencies as well
> and comments to that effect
> 
> Signed-off-by: Jeremy J. Peper <jeremy@jeremypeper.com>
> ---
>   package/targetcli-fb/Config.in       | 13 ++++++++++++-
>   package/targetcli-fb/targetcli-fb.mk |  2 +-
>   2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/package/targetcli-fb/Config.in b/package/targetcli-fb/Config.in
> index 04c6a1ac..57b1a7cd 100644
> --- a/package/targetcli-fb/Config.in
> +++ b/package/targetcli-fb/Config.in
> @@ -1,12 +1,23 @@
> -comment "targetcli-fb depends on Python"
> +comment "targetcli-fb depends on Python, needs a glibc toolchain, gcc >= 4.9, host gcc >= 8"
>   	depends on !BR2_PACKAGE_PYTHON3
> +	depends on BR2_USE_MMU
> +	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
> +	depends on !BR2_TOOLCHAIN_USES_GLIBC || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
> +		!BR2_HOST_GCC_AT_LEAST_8

  I see you copied that exactly from python-gobject/Config.in - it's fine to do 
that, but I took this opportunity to reorder everything alphabetically.

>   
>   config BR2_PACKAGE_TARGETCLI_FB
>   	bool "targetcli-fb"
>   	depends on BR2_PACKAGE_PYTHON3 # python-configshell-fb
> +	depends on BR2_USE_MMU # python-gobject
> +	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS # python-gobject
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # python-gobject
> +	depends on BR2_HOST_GCC_AT_LEAST_8 # python-gobject
> +	depends on BR2_TOOLCHAIN_USES_GLIBC # python-gobject

  Same here, I ordered them alphabetically. I also added
"-> gobject-introspection" at the end of the comment, to show where the 
dependencies really come from.

>   	select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB
>   	select BR2_PACKAGE_PYTHON_RTSLIB_FB
>   	select BR2_PACKAGE_PYTHON_SIX
> +	select BR2_PACKAGE_PYTHON_GOBJECT
>   	help
>   	  targetcli-fb is a command-line interface for configuring the
>   	  LIO generic SCSI target, present in 3.x Linux kernel
> diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk
> index d2cbf79e..dbe36e59 100644
> --- a/package/targetcli-fb/targetcli-fb.mk
> +++ b/package/targetcli-fb/targetcli-fb.mk
> @@ -12,7 +12,7 @@ TARGETCLI_FB_LICENSE = Apache-2.0
>   TARGETCLI_FB_LICENSE_FILES = COPYING
>   TARGETCLI_FB_CPE_ID_VALID = YES
>   TARGETCLI_FB_SETUP_TYPE = setuptools
> -TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six
> +TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six python-gobject

  I've taken the opportunity to split this over multiple lines (one per 
dependency) and also sorted alphabetically.

>   
>   define TARGETCLI_FB_INSTALL_INIT_SYSV
>   	$(INSTALL) -m 0755 -D package/targetcli-fb/S50target \

  Thanks,
  Regards,
  Arnout

[1] 
https://gitlab.com/buildroot.org/buildroot/-/commit/945b9f8d8e9704fd3d2dbd2579ebf9178ed49d89
Arnout Vandecappelle March 15, 2024, 8:24 p.m. UTC | #3
On 12/03/2024 21:14, Jeremy J. Peper wrote:
> add python-gobject to resolve "ModuleNotFoundError: No module named 'gi'" error encountered if built without it.
> add python-gobject's dependencies as well
> and comments to that effect
> 
> Signed-off-by: Jeremy J. Peper <jeremy@jeremypeper.com>

  Something I forgot to mention: in the future, please add a patch changelog 
below the --- line. See [1].

  Regards,
  Arnout

[1] https://nightly.buildroot.org/#_patch_revision_changelog

> ---
>   package/targetcli-fb/Config.in       | 13 ++++++++++++-
>   package/targetcli-fb/targetcli-fb.mk |  2 +-
>   2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/package/targetcli-fb/Config.in b/package/targetcli-fb/Config.in
> index 04c6a1ac..57b1a7cd 100644
> --- a/package/targetcli-fb/Config.in
> +++ b/package/targetcli-fb/Config.in
> @@ -1,12 +1,23 @@
> -comment "targetcli-fb depends on Python"
> +comment "targetcli-fb depends on Python, needs a glibc toolchain, gcc >= 4.9, host gcc >= 8"
>   	depends on !BR2_PACKAGE_PYTHON3
> +	depends on BR2_USE_MMU
> +	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
> +	depends on !BR2_TOOLCHAIN_USES_GLIBC || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
> +		!BR2_HOST_GCC_AT_LEAST_8
>   
>   config BR2_PACKAGE_TARGETCLI_FB
>   	bool "targetcli-fb"
>   	depends on BR2_PACKAGE_PYTHON3 # python-configshell-fb
> +	depends on BR2_USE_MMU # python-gobject
> +	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS # python-gobject
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # python-gobject
> +	depends on BR2_HOST_GCC_AT_LEAST_8 # python-gobject
> +	depends on BR2_TOOLCHAIN_USES_GLIBC # python-gobject
>   	select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB
>   	select BR2_PACKAGE_PYTHON_RTSLIB_FB
>   	select BR2_PACKAGE_PYTHON_SIX
> +	select BR2_PACKAGE_PYTHON_GOBJECT
>   	help
>   	  targetcli-fb is a command-line interface for configuring the
>   	  LIO generic SCSI target, present in 3.x Linux kernel
> diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk
> index d2cbf79e..dbe36e59 100644
> --- a/package/targetcli-fb/targetcli-fb.mk
> +++ b/package/targetcli-fb/targetcli-fb.mk
> @@ -12,7 +12,7 @@ TARGETCLI_FB_LICENSE = Apache-2.0
>   TARGETCLI_FB_LICENSE_FILES = COPYING
>   TARGETCLI_FB_CPE_ID_VALID = YES
>   TARGETCLI_FB_SETUP_TYPE = setuptools
> -TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six
> +TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six python-gobject
>   
>   define TARGETCLI_FB_INSTALL_INIT_SYSV
>   	$(INSTALL) -m 0755 -D package/targetcli-fb/S50target \
Peter Korsgaard March 21, 2024, 8:57 p.m. UTC | #4
>>>>> "Arnout" == Arnout Vandecappelle via buildroot <buildroot@buildroot.org> writes:

 >  Hi Jeremy,
 >  Thank you for your contribution! I've made a few minor changes (see
 >  below) and applied to master, thanks! You can look at [1] to see what
 > it ended up as.

 >  And thank you Adam for your effective review!

Committed to 2024.02.x, 2023.02.x and 2023.11.x, thanks.
diff mbox series

Patch

diff --git a/package/targetcli-fb/Config.in b/package/targetcli-fb/Config.in
index 04c6a1ac..57b1a7cd 100644
--- a/package/targetcli-fb/Config.in
+++ b/package/targetcli-fb/Config.in
@@ -1,12 +1,23 @@ 
-comment "targetcli-fb depends on Python"
+comment "targetcli-fb depends on Python, needs a glibc toolchain, gcc >= 4.9, host gcc >= 8"
 	depends on !BR2_PACKAGE_PYTHON3
+	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+		!BR2_HOST_GCC_AT_LEAST_8
 
 config BR2_PACKAGE_TARGETCLI_FB
 	bool "targetcli-fb"
 	depends on BR2_PACKAGE_PYTHON3 # python-configshell-fb
+	depends on BR2_USE_MMU # python-gobject
+	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS # python-gobject
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # python-gobject
+	depends on BR2_HOST_GCC_AT_LEAST_8 # python-gobject
+	depends on BR2_TOOLCHAIN_USES_GLIBC # python-gobject
 	select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB
 	select BR2_PACKAGE_PYTHON_RTSLIB_FB
 	select BR2_PACKAGE_PYTHON_SIX
+	select BR2_PACKAGE_PYTHON_GOBJECT
 	help
 	  targetcli-fb is a command-line interface for configuring the
 	  LIO generic SCSI target, present in 3.x Linux kernel
diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk
index d2cbf79e..dbe36e59 100644
--- a/package/targetcli-fb/targetcli-fb.mk
+++ b/package/targetcli-fb/targetcli-fb.mk
@@ -12,7 +12,7 @@  TARGETCLI_FB_LICENSE = Apache-2.0
 TARGETCLI_FB_LICENSE_FILES = COPYING
 TARGETCLI_FB_CPE_ID_VALID = YES
 TARGETCLI_FB_SETUP_TYPE = setuptools
-TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six
+TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six python-gobject
 
 define TARGETCLI_FB_INSTALL_INIT_SYSV
 	$(INSTALL) -m 0755 -D package/targetcli-fb/S50target \