[v2,3/4] package/python-pyyaml: add a host-python3 dependency for host variant
diff mbox series

Message ID 20191026152943.122511-4-titouan.christophe@railnova.eu
State New
Headers show
Series
  • package/mongodb: Bump to v4.1.10
Related show

Commit Message

Titouan Christophe Oct. 26, 2019, 3:29 p.m. UTC
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>

host-python-pyyaml on host-python3 is needed for mongodb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Titouan: Fix comment line contains UTF-8 characters]
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
 package/python-pyyaml/python-pyyaml.mk | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thomas Petazzoni Oct. 26, 2019, 5:16 p.m. UTC | #1
Hello,

Yegor, Asaf, your input is welcome.

On Sat, 26 Oct 2019 17:29:42 +0200
Titouan Christophe <titouan.christophe@railnova.eu> wrote:

> From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> 
> host-python-pyyaml on host-python3 is needed for mongodb
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> [Titouan: Fix comment line contains UTF-8 characters]
> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
> ---
>  package/python-pyyaml/python-pyyaml.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/package/python-pyyaml/python-pyyaml.mk b/package/python-pyyaml/python-pyyaml.mk
> index 165a938f11..e74405c065 100644
> --- a/package/python-pyyaml/python-pyyaml.mk
> +++ b/package/python-pyyaml/python-pyyaml.mk
> @@ -13,5 +13,8 @@ PYTHON_PYYAML_LICENSE_FILES = LICENSE
>  PYTHON_PYYAML_DEPENDENCIES = libyaml
>  HOST_PYTHON_PYYAML_DEPENDENCIES = host-libyaml
>  
> +# Needed to build mongodb
> +HOST_PYTHON_PYYAML_NEEDS_HOST_PYTHON = python3

I'm a bit worried about this. It means that if BR2_PACKAGE_PYTHON=y,
then the default host python is host-python (i.e Python 2.x), and
therefore all host Python modules are installed for Python 2.x...
except now this pyyaml module.

It doesn't sound good. I think our solution in this case is to add a
separate python3-pyyaml package, like we have for python3-mako and
python3-setuptools.

My comment also applies to PATCH 1/4 on this series, adding a host
variant of python-psutil, but making it available only for Python 3.x.

Yegor, Asaf, I would very much welcome your feedback on this topic.

Thanks,

Thomas

Patch
diff mbox series

diff --git a/package/python-pyyaml/python-pyyaml.mk b/package/python-pyyaml/python-pyyaml.mk
index 165a938f11..e74405c065 100644
--- a/package/python-pyyaml/python-pyyaml.mk
+++ b/package/python-pyyaml/python-pyyaml.mk
@@ -13,5 +13,8 @@  PYTHON_PYYAML_LICENSE_FILES = LICENSE
 PYTHON_PYYAML_DEPENDENCIES = libyaml
 HOST_PYTHON_PYYAML_DEPENDENCIES = host-libyaml
 
+# Needed to build mongodb
+HOST_PYTHON_PYYAML_NEEDS_HOST_PYTHON = python3
+
 $(eval $(python-package))
 $(eval $(host-python-package))