diff mbox series

[v2,1/3] package/python-yamllint: new package

Message ID 20240404081714.1190807-1-heiko.thiery@gmail.com
State Changes Requested
Headers show
Series [v2,1/3] package/python-yamllint: new package | expand

Commit Message

Heiko Thiery April 4, 2024, 8:17 a.m. UTC
This host package is needed since u-boot 2024.04 for building ti defconfigs.

This is an requirement for using buildman/binman [1].

[1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.04/tools/buildman/requirements.txt?ref_type=tags#L3

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/Config.in                            |  1 +
 package/python-yamllint/Config.in            |  6 ++++++
 package/python-yamllint/python-yamllint.hash |  3 +++
 package/python-yamllint/python-yamllint.mk   | 15 +++++++++++++++
 4 files changed, 25 insertions(+)
 create mode 100644 package/python-yamllint/Config.in
 create mode 100644 package/python-yamllint/python-yamllint.hash
 create mode 100644 package/python-yamllint/python-yamllint.mk

--
2.39.2

Comments

Romain Naour April 10, 2024, 9:58 p.m. UTC | #1
Hello Heiko,

Le 04/04/2024 à 10:17, Heiko Thiery a écrit :
> This host package is needed since u-boot 2024.04 for building ti defconfigs.
> 
> This is an requirement for using buildman/binman [1].
> 
> [1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.04/tools/buildman/requirements.txt?ref_type=tags#L3
> 
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
>  package/Config.in                            |  1 +
>  package/python-yamllint/Config.in            |  6 ++++++
>  package/python-yamllint/python-yamllint.hash |  3 +++
>  package/python-yamllint/python-yamllint.mk   | 15 +++++++++++++++
>  4 files changed, 25 insertions(+)
>  create mode 100644 package/python-yamllint/Config.in
>  create mode 100644 package/python-yamllint/python-yamllint.hash
>  create mode 100644 package/python-yamllint/python-yamllint.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 87767993a2..a02370a2ad 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1437,6 +1437,7 @@ menu "External python modules"
>  	source "package/python-xmljson/Config.in"
>  	source "package/python-xmltodict/Config.in"
>  	source "package/python-xmodem/Config.in"
> +	source "package/python-yamllint/Config.in"
>  	source "package/python-yarl/Config.in"
>  	source "package/python-yatl/Config.in"
>  	source "package/python-zc-lockfile/Config.in"
> diff --git a/package/python-yamllint/Config.in b/package/python-yamllint/Config.in
> new file mode 100644
> index 0000000000..cb67b355c3
> --- /dev/null
> +++ b/package/python-yamllint/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_PYTHON_YAMLLINT
> +	bool "python-yamllint"

You are adding the target variant here but python-pyyaml and python-pathspec
runtime dependencies are missing:

https://github.com/adrienverge/yamllint/blob/master/pyproject.toml#L20

Since python package easily break at runtime, it would be great if you can add a
runtime test.

I tested the host variant to build uboot 2024.04 for the SK-TDA4VM board.

Tested-by: Romain Naour <romain.naour@smile.fr>

Best regards,
Romain


> +	help
> +	  A linter for YAML files.
> +
> +	  https://github.com/adrienverge/yamllint
> diff --git a/package/python-yamllint/python-yamllint.hash b/package/python-yamllint/python-yamllint.hash
> new file mode 100644
> index 0000000000..d80e0fdf42
> --- /dev/null
> +++ b/package/python-yamllint/python-yamllint.hash
> @@ -0,0 +1,3 @@
> +# Locally computed sha256 checksums
> +sha256  7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd  yamllint-1.35.1.tar.gz
> +sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
> diff --git a/package/python-yamllint/python-yamllint.mk b/package/python-yamllint/python-yamllint.mk
> new file mode 100644
> index 0000000000..ceaca3b0b8
> --- /dev/null
> +++ b/package/python-yamllint/python-yamllint.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# python-yamllint
> +#
> +################################################################################
> +
> +PYTHON_YAMLLINT_VERSION = 1.35.1
> +PYTHON_YAMLLINT_SOURCE = yamllint-$(PYTHON_YAMLLINT_VERSION).tar.gz
> +PYTHON_YAMLLINT_SITE = https://files.pythonhosted.org/packages/da/06/d8cee5c3dfd550cc0a466ead8b321138198485d1034130ac1393cc49d63e
> +PYTHON_YAMLLINT_SETUP_TYPE = pep517
> +PYTHON_YAMLLINT_LICENSE = GPL-3.0
> +PYTHON_YAMLLINT_LICENSE_FILES = LICENSE
> +
> +$(eval $(python-package))
> +$(eval $(host-python-package))
> --
> 2.39.2
>
Heiko Thiery April 11, 2024, 11:50 a.m. UTC | #2
Hi Romain,

Am Mi., 10. Apr. 2024 um 23:58 Uhr schrieb Romain Naour <romain.naour@smile.fr>:
>
> Hello Heiko,
>
> Le 04/04/2024 à 10:17, Heiko Thiery a écrit :
> > This host package is needed since u-boot 2024.04 for building ti defconfigs.
> >
> > This is an requirement for using buildman/binman [1].
> >
> > [1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.04/tools/buildman/requirements.txt?ref_type=tags#L3
> >
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> > ---
> >  package/Config.in                            |  1 +
> >  package/python-yamllint/Config.in            |  6 ++++++
> >  package/python-yamllint/python-yamllint.hash |  3 +++
> >  package/python-yamllint/python-yamllint.mk   | 15 +++++++++++++++
> >  4 files changed, 25 insertions(+)
> >  create mode 100644 package/python-yamllint/Config.in
> >  create mode 100644 package/python-yamllint/python-yamllint.hash
> >  create mode 100644 package/python-yamllint/python-yamllint.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index 87767993a2..a02370a2ad 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -1437,6 +1437,7 @@ menu "External python modules"
> >       source "package/python-xmljson/Config.in"
> >       source "package/python-xmltodict/Config.in"
> >       source "package/python-xmodem/Config.in"
> > +     source "package/python-yamllint/Config.in"
> >       source "package/python-yarl/Config.in"
> >       source "package/python-yatl/Config.in"
> >       source "package/python-zc-lockfile/Config.in"
> > diff --git a/package/python-yamllint/Config.in b/package/python-yamllint/Config.in
> > new file mode 100644
> > index 0000000000..cb67b355c3
> > --- /dev/null
> > +++ b/package/python-yamllint/Config.in
> > @@ -0,0 +1,6 @@
> > +config BR2_PACKAGE_PYTHON_YAMLLINT
> > +     bool "python-yamllint"
>
> You are adding the target variant here but python-pyyaml and python-pathspec
> runtime dependencies are missing:

You are right. Just added this here.

>
> https://github.com/adrienverge/yamllint/blob/master/pyproject.toml#L20
>
> Since python package easily break at runtime, it would be great if you can add a
> runtime test.

As expected the target package breaks becauset pythspec is not present
because it is not available as target package. I will fix that, add
the testcase and prepare for v2.

> I tested the host variant to build uboot 2024.04 for the SK-TDA4VM board.

thanks

> Tested-by: Romain Naour <romain.naour@smile.fr>
>
> Best regards,
> Romain
>
>
> > +     help
> > +       A linter for YAML files.
> > +
> > +       https://github.com/adrienverge/yamllint
> > diff --git a/package/python-yamllint/python-yamllint.hash b/package/python-yamllint/python-yamllint.hash
> > new file mode 100644
> > index 0000000000..d80e0fdf42
> > --- /dev/null
> > +++ b/package/python-yamllint/python-yamllint.hash
> > @@ -0,0 +1,3 @@
> > +# Locally computed sha256 checksums
> > +sha256  7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd  yamllint-1.35.1.tar.gz
> > +sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
> > diff --git a/package/python-yamllint/python-yamllint.mk b/package/python-yamllint/python-yamllint.mk
> > new file mode 100644
> > index 0000000000..ceaca3b0b8
> > --- /dev/null
> > +++ b/package/python-yamllint/python-yamllint.mk
> > @@ -0,0 +1,15 @@
> > +################################################################################
> > +#
> > +# python-yamllint
> > +#
> > +################################################################################
> > +
> > +PYTHON_YAMLLINT_VERSION = 1.35.1
> > +PYTHON_YAMLLINT_SOURCE = yamllint-$(PYTHON_YAMLLINT_VERSION).tar.gz
> > +PYTHON_YAMLLINT_SITE = https://files.pythonhosted.org/packages/da/06/d8cee5c3dfd550cc0a466ead8b321138198485d1034130ac1393cc49d63e
> > +PYTHON_YAMLLINT_SETUP_TYPE = pep517
> > +PYTHON_YAMLLINT_LICENSE = GPL-3.0
> > +PYTHON_YAMLLINT_LICENSE_FILES = LICENSE
> > +
> > +$(eval $(python-package))
> > +$(eval $(host-python-package))
> > --
> > 2.39.2
> >
>
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 87767993a2..a02370a2ad 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1437,6 +1437,7 @@  menu "External python modules"
 	source "package/python-xmljson/Config.in"
 	source "package/python-xmltodict/Config.in"
 	source "package/python-xmodem/Config.in"
+	source "package/python-yamllint/Config.in"
 	source "package/python-yarl/Config.in"
 	source "package/python-yatl/Config.in"
 	source "package/python-zc-lockfile/Config.in"
diff --git a/package/python-yamllint/Config.in b/package/python-yamllint/Config.in
new file mode 100644
index 0000000000..cb67b355c3
--- /dev/null
+++ b/package/python-yamllint/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_PYTHON_YAMLLINT
+	bool "python-yamllint"
+	help
+	  A linter for YAML files.
+
+	  https://github.com/adrienverge/yamllint
diff --git a/package/python-yamllint/python-yamllint.hash b/package/python-yamllint/python-yamllint.hash
new file mode 100644
index 0000000000..d80e0fdf42
--- /dev/null
+++ b/package/python-yamllint/python-yamllint.hash
@@ -0,0 +1,3 @@ 
+# Locally computed sha256 checksums
+sha256  7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd  yamllint-1.35.1.tar.gz
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
diff --git a/package/python-yamllint/python-yamllint.mk b/package/python-yamllint/python-yamllint.mk
new file mode 100644
index 0000000000..ceaca3b0b8
--- /dev/null
+++ b/package/python-yamllint/python-yamllint.mk
@@ -0,0 +1,15 @@ 
+################################################################################
+#
+# python-yamllint
+#
+################################################################################
+
+PYTHON_YAMLLINT_VERSION = 1.35.1
+PYTHON_YAMLLINT_SOURCE = yamllint-$(PYTHON_YAMLLINT_VERSION).tar.gz
+PYTHON_YAMLLINT_SITE = https://files.pythonhosted.org/packages/da/06/d8cee5c3dfd550cc0a466ead8b321138198485d1034130ac1393cc49d63e
+PYTHON_YAMLLINT_SETUP_TYPE = pep517
+PYTHON_YAMLLINT_LICENSE = GPL-3.0
+PYTHON_YAMLLINT_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
+$(eval $(host-python-package))