All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext
@ 2020-04-05 14:28 Bernd Kuhls
  2020-04-05 14:28 ` [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb Bernd Kuhls
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bernd Kuhls @ 2020-04-05 14:28 UTC (permalink / raw)
  To: buildroot

Tested using this defconfig:

BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_SYSTEM_ENABLE_NLS=y
BR2_PACKAGE_PYTHON3=y

Without this patch:
$ readelf -a output/target/usr/lib/libpython3.8.so.1.0 | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

With this patch:
$ readelf -a output/target/usr/lib/libpython3.8.so.1.0 | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libintl.so.8]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: unchanged, added to series

 package/python3/python3.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index d12237300d..2656037efd 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -146,6 +146,10 @@ ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 PYTHON3_CONF_ENV += ac_cv_func_wcsftime=no
 endif
 
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
+PYTHON3_DEPENDENCIES += gettext
+endif
+
 PYTHON3_CONF_OPTS += \
 	--without-ensurepip \
 	--without-cxx-main \
-- 
2.25.0

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

* [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb
  2020-04-05 14:28 [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Bernd Kuhls
@ 2020-04-05 14:28 ` Bernd Kuhls
  2020-04-11  8:56   ` Thomas Petazzoni
  2020-04-11  8:54 ` [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Thomas Petazzoni
  2020-04-29 21:03 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Bernd Kuhls @ 2020-04-05 14:28 UTC (permalink / raw)
  To: buildroot

Tested using this defconfig:

BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_BERKELEYDB=y

Without this patch:

$ ls -la output/target/usr/lib/python3.8/lib-dynload | grep dbm
$

With this patch:

$ ls -la output/target/usr/lib/python3.8/lib-dynload | grep dbm
-rwxr-xr-x  1 bernd bernd   95240 Apr  5 16:19 _dbm.cpython-38-x86_64-linux-gnu.so

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/python3/python3.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 2656037efd..98c78bb156 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -150,6 +150,10 @@ ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
 PYTHON3_DEPENDENCIES += gettext
 endif
 
+ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
+PYTHON3_DEPENDENCIES += berkeleydb
+endif
+
 PYTHON3_CONF_OPTS += \
 	--without-ensurepip \
 	--without-cxx-main \
-- 
2.25.0

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

* [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext
  2020-04-05 14:28 [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Bernd Kuhls
  2020-04-05 14:28 ` [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb Bernd Kuhls
@ 2020-04-11  8:54 ` Thomas Petazzoni
  2020-04-29 21:03 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-04-11  8:54 UTC (permalink / raw)
  To: buildroot

On Sun,  5 Apr 2020 16:28:22 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Tested using this defconfig:
> 
> BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
> BR2_SYSTEM_ENABLE_NLS=y
> BR2_PACKAGE_PYTHON3=y
> 
> Without this patch:
> $ readelf -a output/target/usr/lib/libpython3.8.so.1.0 | grep NEEDED
>  0x00000001 (NEEDED)                     Shared library: [libc.so.0]
> 
> With this patch:
> $ readelf -a output/target/usr/lib/libpython3.8.so.1.0 | grep NEEDED
>  0x00000001 (NEEDED)                     Shared library: [libintl.so.8]
>  0x00000001 (NEEDED)                     Shared library: [libc.so.0]
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: unchanged, added to series

I was hesitating between applying this, and using
TARGET_NLS_DEPENDENCIES. But after looking a bit deeper, Python doesn't
really use a standard NLS support, it really checks specifically for
libintl, so I've applied your patch.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb
  2020-04-05 14:28 ` [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb Bernd Kuhls
@ 2020-04-11  8:56   ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-04-11  8:56 UTC (permalink / raw)
  To: buildroot

Hello Bernd,

On Sun,  5 Apr 2020 16:28:23 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> +ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
> +PYTHON3_DEPENDENCIES += berkeleydb
> +endif

For all Python modules that have external dependencies, we like to have
an option that allows to explicitly disable it:

0018-Add-an-option-to-disable-the-curses-module.patch
0019-Add-an-option-to-disable-expat.patch
0020-Add-an-option-to-disable-CJK-codecs.patch
0021-Add-an-option-to-disable-NIS.patch
0022-Add-an-option-to-disable-unicodedata.patch
0023-Add-an-option-to-disable-IDLE.patch
0024-Add-an-option-to-disable-decimal.patch
0025-Add-an-option-to-disable-the-ossaudiodev-module.patch
0026-Add-an-option-to-disable-openssl-support.patch
0027-Add-an-option-to-disable-the-readline-module.patch
0028-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch

Could you add a similar patch to explicitly disable the build of the
dbm module when berkeleydb is not available, and then use that new
option in python3.mk ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext
  2020-04-05 14:28 [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Bernd Kuhls
  2020-04-05 14:28 ` [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb Bernd Kuhls
  2020-04-11  8:54 ` [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Thomas Petazzoni
@ 2020-04-29 21:03 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-04-29 21:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:

 > Tested using this defconfig:
 > BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
 > BR2_SYSTEM_ENABLE_NLS=y
 > BR2_PACKAGE_PYTHON3=y

 > Without this patch:
 > $ readelf -a output/target/usr/lib/libpython3.8.so.1.0 | grep NEEDED
 >  0x00000001 (NEEDED)                     Shared library: [libc.so.0]

 > With this patch:
 > $ readelf -a output/target/usr/lib/libpython3.8.so.1.0 | grep NEEDED
 >  0x00000001 (NEEDED)                     Shared library: [libintl.so.8]
 >  0x00000001 (NEEDED)                     Shared library: [libc.so.0]

 > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 > ---
 > v2: unchanged, added to series

Committed to 2020.02.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2020-04-29 21:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 14:28 [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Bernd Kuhls
2020-04-05 14:28 ` [Buildroot] [PATCH 2/2] package/python3: add optional support for berkeleydb Bernd Kuhls
2020-04-11  8:56   ` Thomas Petazzoni
2020-04-11  8:54 ` [Buildroot] [PATCH v2 1/2] package/python3: add optional dependency to gettext Thomas Petazzoni
2020-04-29 21:03 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.