[meta-python] python3-pyscaffold: fix wheel build and license

Message ID 20220301221548.30730-1-jsbronder@cold-front.org
State New
Headers show
Series [meta-python] python3-pyscaffold: fix wheel build and license | expand

Commit Message

Justin Bronder March 1, 2022, 10:15 p.m. UTC
Without python3-setuptools-scm-native, the version on the generated
wheel is 0.0.0, not ${PV} as expected which causes
pip_install_wheel_do_install to fail to find the wheel.

Consulting the LICENSE.txt distributed with the source, the template
files under pyscaffold.templates, which are installed as part of this
recipe, are licensed as BSD-0-Clause

Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
---
 .../recipes-devtools/python/python3-pyscaffold_4.1.4.bb     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Peter Kjellerstedt March 2, 2022, 2:49 p.m. UTC | #1
> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-
> devel@lists.openembedded.org> On Behalf Of Justin Bronder
> Sent: den 1 mars 2022 23:16
> To: openembedded-devel@lists.openembedded.org
> Subject: [oe] [meta-python][PATCH] python3-pyscaffold: fix wheel build and
> license
> 
> Without python3-setuptools-scm-native, the version on the generated
> wheel is 0.0.0, not ${PV} as expected which causes
> pip_install_wheel_do_install to fail to find the wheel.
> 
> Consulting the LICENSE.txt distributed with the source, the template
> files under pyscaffold.templates, which are installed as part of this
> recipe, are licensed as BSD-0-Clause
> 
> Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
> ---
>  .../recipes-devtools/python/python3-pyscaffold_4.1.4.bb     | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-python/recipes-devtools/python/python3-
> pyscaffold_4.1.4.bb b/meta-python/recipes-devtools/python/python3-
> pyscaffold_4.1.4.bb
> index 7e5599e4aa..f58fc5e9aa 100644
> --- a/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
> +++ b/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
> @@ -5,8 +5,8 @@ used to create template Projects."
> 
>  HOMEPAGE = "https://github.com/pyscaffold/pyscaffold"
>  SECTION = "devel/python"
> -LICENSE = "MIT"
> -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
> +LICENSE = "BSD-0-Clause & MIT"

The official SPDX identifier is (weirdly enough) "0BSD".

> +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=14a49c74a1d91829908ac756c07e6b91"
> 
>  inherit pypi setuptools3
> 
> @@ -16,6 +16,8 @@ SRC_URI[sha256sum] = "46a2bbdf255ba2efc6c56ae1428249b61d56c4a3e54ef3db0d05fa9779
> 
>  BBCLASSEXTEND = "native nativesdk"
> 
> +DEPENDS += "python3-setuptools-scm-native"

Build dependencies typically go near the start of the recipe, 
i.e., between LIC_FILES_CHKSUM and inherit.

> +
>  RDEPENDS:${PN} += " \
>  	python3-email \
>  	python3-compression \
> --
> 2.35.1

//Peter
Khem Raj March 2, 2022, 5:12 p.m. UTC | #2
On Wed, Mar 2, 2022 at 6:49 AM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> > -----Original Message-----
> > From: openembedded-devel@lists.openembedded.org <openembedded-
> > devel@lists.openembedded.org> On Behalf Of Justin Bronder
> > Sent: den 1 mars 2022 23:16
> > To: openembedded-devel@lists.openembedded.org
> > Subject: [oe] [meta-python][PATCH] python3-pyscaffold: fix wheel build and
> > license
> >
> > Without python3-setuptools-scm-native, the version on the generated
> > wheel is 0.0.0, not ${PV} as expected which causes
> > pip_install_wheel_do_install to fail to find the wheel.
> >
> > Consulting the LICENSE.txt distributed with the source, the template
> > files under pyscaffold.templates, which are installed as part of this
> > recipe, are licensed as BSD-0-Clause
> >
> > Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
> > ---
> >  .../recipes-devtools/python/python3-pyscaffold_4.1.4.bb     | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta-python/recipes-devtools/python/python3-
> > pyscaffold_4.1.4.bb b/meta-python/recipes-devtools/python/python3-
> > pyscaffold_4.1.4.bb
> > index 7e5599e4aa..f58fc5e9aa 100644
> > --- a/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
> > +++ b/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
> > @@ -5,8 +5,8 @@ used to create template Projects."
> >
> >  HOMEPAGE = "https://github.com/pyscaffold/pyscaffold"
> >  SECTION = "devel/python"
> > -LICENSE = "MIT"
> > -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
> > +LICENSE = "BSD-0-Clause & MIT"
>
> The official SPDX identifier is (weirdly enough) "0BSD".

Right, we need to run the conversion script on meta-openembedded
layers but perhaps after python/wheel stuff
settles out. Its better to address it here atleast for this recipe.

>
> > +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=14a49c74a1d91829908ac756c07e6b91"
> >
> >  inherit pypi setuptools3
> >
> > @@ -16,6 +16,8 @@ SRC_URI[sha256sum] = "46a2bbdf255ba2efc6c56ae1428249b61d56c4a3e54ef3db0d05fa9779
> >
> >  BBCLASSEXTEND = "native nativesdk"
> >
> > +DEPENDS += "python3-setuptools-scm-native"
>
> Build dependencies typically go near the start of the recipe,
> i.e., between LIC_FILES_CHKSUM and inherit.

yeah oe-stylize helps a bit with these kind of issues.

>
> > +
> >  RDEPENDS:${PN} += " \
> >       python3-email \
> >       python3-compression \
> > --
> > 2.35.1
>
> //Peter
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#95689): https://lists.openembedded.org/g/openembedded-devel/message/95689
> Mute This Topic: https://lists.openembedded.org/mt/89489231/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

Patch

diff --git a/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb b/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
index 7e5599e4aa..f58fc5e9aa 100644
--- a/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
+++ b/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.4.bb
@@ -5,8 +5,8 @@  used to create template Projects."
 
 HOMEPAGE = "https://github.com/pyscaffold/pyscaffold"
 SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
+LICENSE = "BSD-0-Clause & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=14a49c74a1d91829908ac756c07e6b91"
 
 inherit pypi setuptools3
 
@@ -16,6 +16,8 @@  SRC_URI[sha256sum] = "46a2bbdf255ba2efc6c56ae1428249b61d56c4a3e54ef3db0d05fa9779
 
 BBCLASSEXTEND = "native nativesdk"
 
+DEPENDS += "python3-setuptools-scm-native"
+
 RDEPENDS:${PN} += " \
 	python3-email \
 	python3-compression \