diff mbox series

[1/1] package/python3-six: add python3 variant

Message ID 1620853148995.76548@lab126.com
State Changes Requested
Headers show
Series [1/1] package/python3-six: add python3 variant | expand

Commit Message

Weber, Matthew L Collins via buildroot May 12, 2021, 8:59 p.m. UTC
Signed-off-by: Donald Chan <hoiho@lab126.com>
---
 package/python3-six/python3-six.hash |  1 +
 package/python3-six/python3-six.mk   | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 120000 package/python3-six/python3-six.hash
 create mode 100644 package/python3-six/python3-six.mk

--
2.17.1

Comments

Yann E. MORIN May 18, 2021, 3 p.m. UTC | #1
Chan, All,

On 2021-05-12 20:59 +0000, Chan, Donald via buildroot spake thusly:
> 
> Signed-off-by: Donald Chan <hoiho@lab126.com>

Why do you need a python3-specific version of six?

The existing package, python-six, is already compatible with both
python(2) and python3...

Please, can you respin with a better commit log, that explains why you
need to add it?

Regards,
Yann E. MORIN.

> ---
>  package/python3-six/python3-six.hash |  1 +
>  package/python3-six/python3-six.mk   | 18 ++++++++++++++++++
>  2 files changed, 19 insertions(+)
>  create mode 120000 package/python3-six/python3-six.hash
>  create mode 100644 package/python3-six/python3-six.mk
> 
> diff --git a/package/python3-six/python3-six.hash b/package/python3-six/python3-six.hash
> new file mode 120000
> index 0000000..ed8cb89
> --- /dev/null
> +++ b/package/python3-six/python3-six.hash
> @@ -0,0 +1 @@
> +../python-six/python-six.hash
> \ No newline at end of file
> diff --git a/package/python3-six/python3-six.mk b/package/python3-six/python3-six.mk
> new file mode 100644
> index 0000000..be64fce
> --- /dev/null
> +++ b/package/python3-six/python3-six.mk
> @@ -0,0 +1,18 @@
> +################################################################################
> +#
> +# python3-six
> +#
> +################################################################################
> +
> +# Please keep in sync with package/python-six/python-six.mk
> +PYTHON3_SIX_VERSION = 1.15.0
> +PYTHON3_SIX_SOURCE = six-$(PYTHON3_SIX_VERSION).tar.gz
> +PYTHON3_SIX_SITE = https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426
> +PYTHON3_SIX_SETUP_TYPE = setuptools
> +PYTHON3_SIX_LICENSE = MIT
> +PYTHON3_SIX_LICENSE_FILES = LICENSE
> +HOST_PYTHON3_SIX_DL_SUBDIR = python-six
> +HOST_PYTHON3_SIX_NEEDS_HOST_PYTHON = python3
> +
> +$(eval $(python-package))
> +$(eval $(host-python-package))
> --
> 2.17.1
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN May 19, 2021, noon UTC | #2
Chan, All,

On 2021-05-18 20:43 +0000, Chan, Donald spake thusly:
> On 2021-05-12 20:59 +0000, Chan, Donald via buildroot spake thusly:
> >> Signed-off-by: Donald Chan <hoiho@lab126.com>
> >Why do you need a python3-specific version of six?
> This was for the host side Python packages

Your patch was adding both the target and the host variants, though.

> - I see the same patterns
> for other python packages like
> - python3-requests/python3-requests.mk
> - python3-mako/python3-mako.mk

Ah, but those were added because we have a need for them: in some
situations, we need to have both the python2 and python3 modules for
those installed at the same time.

For example:
    $ git grep -E 'host-python3?-mako'
    package/gnuradio/gnuradio.mk:# host-python-mako and host-python-six are needed for volk to compile
    package/gnuradio/gnuradio.mk:	host-python-mako \
    package/jailhouse/jailhouse.mk:	host-python-mako \
    package/mesa3d/mesa3d.mk:	host-python3-mako \
    package/piglit/piglit.mk:	host-python-mako \
    package/sdbusplus/sdbusplus.mk:	host-python-mako \
    package/uhd/uhd.mk:	host-python-mako

So, as you can see, we have packages that need the python2 host mako,
and others (one, really) that needs the python3 host mako. The situation
is similar for the other python3-specific packages.

> Let me me know if this makes sense.

Yeah, I see the reasoning, but we are only adding the python3-specific
variant when there is an actual need for it.

If you can provide such an example that a specific host-python3-six
is needed, do not hesitate to resend your patch with such an explanation
in your commit log.

Thanks again for your contribution!

Regards,
Yann E. MORIN.
Yann E. MORIN May 19, 2021, 9:08 p.m. UTC | #3
Chan, All,

On 2021-05-19 21:00 +0000, Chan, Donald via buildroot spake thusly:
> On 2021-05-18 20:43 +0000, Chan, Donald spake thusly:
> > > On 2021-05-12 20:59 +0000, Chan, Donald via buildroot spake thusly:
> > > >> Signed-off-by: Donald Chan <hoiho@lab126.com>
> > > >Why do you need a python3-specific version of six?
> > > This was for the host side Python packages
> > Your patch was adding both the target and the host variants, though.
> Should I remove the $(eval $(python-package)) line then?

Yes. Just keep the host-python-package one.

> > If you can provide such an example that a specific host-python3-six
> > is needed, do not hesitate to resend your patch with such an explanation
> > in your commit log.
> Yes do let me explain - I am making some contributions to another OSS
> software (OP-TEE) that uses buildroot, and it requires a python3
> variant of the python-cryptography module, which in returns requires
> python3 variants of its dependencies (python-cffi, python-six,
> python-pycparser, python-pip). etc.

Ah, good explanations. Thanks. Please explain that in the commit log
when you resubmit (see below).

> Shall I re-submit everything in a new patch set (split to multiple patches)?

Yes, please. Having the new host-python3-six alone does not make much
sense. If it is followed in the same series by a patch that makes use of
it, then it becones obvious what it is for.

Thanks you for the follow-up with the explanations! :-)

Regards,
Yann E. MORIN.
Weber, Matthew L Collins via buildroot May 20, 2021, 1:50 a.m. UTC | #4
Submitted a new set of 5 patches - thanks for helping!
diff mbox series

Patch

diff --git a/package/python3-six/python3-six.hash b/package/python3-six/python3-six.hash
new file mode 120000
index 0000000..ed8cb89
--- /dev/null
+++ b/package/python3-six/python3-six.hash
@@ -0,0 +1 @@ 
+../python-six/python-six.hash
\ No newline at end of file
diff --git a/package/python3-six/python3-six.mk b/package/python3-six/python3-six.mk
new file mode 100644
index 0000000..be64fce
--- /dev/null
+++ b/package/python3-six/python3-six.mk
@@ -0,0 +1,18 @@ 
+################################################################################
+#
+# python3-six
+#
+################################################################################
+
+# Please keep in sync with package/python-six/python-six.mk
+PYTHON3_SIX_VERSION = 1.15.0
+PYTHON3_SIX_SOURCE = six-$(PYTHON3_SIX_VERSION).tar.gz
+PYTHON3_SIX_SITE = https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426
+PYTHON3_SIX_SETUP_TYPE = setuptools
+PYTHON3_SIX_LICENSE = MIT
+PYTHON3_SIX_LICENSE_FILES = LICENSE
+HOST_PYTHON3_SIX_DL_SUBDIR = python-six
+HOST_PYTHON3_SIX_NEEDS_HOST_PYTHON = python3
+
+$(eval $(python-package))
+$(eval $(host-python-package))