diff mbox series

[v2,2/2] package/python-esptool: new package

Message ID 20191107170504.1327891-2-b.bilas@grinn-global.com
State Accepted
Headers show
Series [v2,1/2] package/python-pyaes: new package | expand

Commit Message

Bartosz Bilas Nov. 7, 2019, 5:05 p.m. UTC
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
---
Changes v1 -> v2:
  - Use existing python-serial package 
    instead of creating a new python-pyserial.

 DEVELOPERS                                 |  1 +
 package/Config.in                          |  1 +
 package/python-esptool/Config.in           | 10 ++++++++++
 package/python-esptool/python-esptool.hash |  5 +++++
 package/python-esptool/python-esptool.mk   | 14 ++++++++++++++
 5 files changed, 31 insertions(+)
 create mode 100644 package/python-esptool/Config.in
 create mode 100644 package/python-esptool/python-esptool.hash
 create mode 100644 package/python-esptool/python-esptool.mk

Comments

Thomas Petazzoni Nov. 7, 2019, 10:50 p.m. UTC | #1
Hello Bartosz,

On Thu,  7 Nov 2019 18:05:04 +0100
Bartosz Bilas <b.bilas@grinn-global.com> wrote:

> diff --git a/DEVELOPERS b/DEVELOPERS
> index e9f5345520..49440930fc 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -259,6 +259,7 @@ N:	Bartosz Bilas <b.bilas@grinn-global.com>
>  F:	package/qt5/qt5scxml/
>  F:	package/qt5/qt5webview/
>  F:	package/python-pyaes
> +F:	package/python-esptool

Alphabetic ordering + final /.


> diff --git a/package/python-esptool/Config.in b/package/python-esptool/Config.in
> new file mode 100644
> index 0000000000..10066797a7
> --- /dev/null
> +++ b/package/python-esptool/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_PYTHON_ESPTOOL
> +	bool "python-esptool"
> +	select BR2_PACKAGE_PYTHON_SERIAL # runtime
> +	select BR2_PACKAGE_PYTHON_PYAES # runtime
> +	select BR2_PACKAGE_PYTHON_ECDSA # runtime

Alphabetic ordering.

> +PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later (GPLv2+)

The proper way to describe this is just:

PYTHON_ESPTOOL_LICENSE = GPL-2.0+

Applied to next with those different issues fixed. Thanks!

Thomas
Bartosz Bilas Nov. 8, 2019, 8:45 a.m. UTC | #2
Hello Thomas,

On 07.11.2019 23:50, Thomas Petazzoni wrote:
> Hello Bartosz,
>
> On Thu,  7 Nov 2019 18:05:04 +0100
> Bartosz Bilas <b.bilas@grinn-global.com> wrote:
>
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index e9f5345520..49440930fc 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -259,6 +259,7 @@ N:	Bartosz Bilas <b.bilas@grinn-global.com>
>>   F:	package/qt5/qt5scxml/
>>   F:	package/qt5/qt5webview/
>>   F:	package/python-pyaes
>> +F:	package/python-esptool
> Alphabetic ordering + final /.
>
>
>> diff --git a/package/python-esptool/Config.in b/package/python-esptool/Config.in
>> new file mode 100644
>> index 0000000000..10066797a7
>> --- /dev/null
>> +++ b/package/python-esptool/Config.in
>> @@ -0,0 +1,10 @@
>> +config BR2_PACKAGE_PYTHON_ESPTOOL
>> +	bool "python-esptool"
>> +	select BR2_PACKAGE_PYTHON_SERIAL # runtime
>> +	select BR2_PACKAGE_PYTHON_PYAES # runtime
>> +	select BR2_PACKAGE_PYTHON_ECDSA # runtime
> Alphabetic ordering.
This and
>
>> +PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later (GPLv2+)
> The proper way to describe this is just:
>
> PYTHON_ESPTOOL_LICENSE = GPL-2.0+

this was created using scanpypi script so do you think we should fix 
that script or adjust that manually as you did?

Best
Bartek
>
> Applied to next with those different issues fixed. Thanks!
>
> Thomas
Thomas Petazzoni Nov. 8, 2019, 8:49 a.m. UTC | #3
Hello,

+Yegor in Cc.

On Fri, 8 Nov 2019 09:45:50 +0100
Bartosz Bilas <b.bilas@grinn-global.com> wrote:

> >> +PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later (GPLv2+)  
> > The proper way to describe this is just:
> >
> > PYTHON_ESPTOOL_LICENSE = GPL-2.0+  
> 
> this was created using scanpypi script so do you think we should fix 
> that script or adjust that manually as you did?

scanpipy already has a conversion table between Pipy-provided license
strings and Buildroot license tags:

                'Apache Software License': 'Apache-2.0',
                'BSD License': 'FIXME: please specify the exact BSD version',
                'European Union Public Licence 1.0': 'EUPL-1.0',
                'European Union Public Licence 1.1': 'EUPL-1.1',
                "GNU General Public License": "GPL",
                "GNU General Public License v2": "GPL-2.0",
                "GNU General Public License v2 or later": "GPL-2.0+",
                "GNU General Public License v3": "GPL-3.0",
                "GNU General Public License v3 or later": "GPL-3.0+",
                "GNU Lesser General Public License v2": "LGPL-2.1",
                "GNU Lesser General Public License v2 or later": "LGPL-2.1+",
                "GNU Lesser General Public License v3": "LGPL-3.0",
                "GNU Lesser General Public License v3 or later": "LGPL-3.0+",
                "GNU Library or Lesser General Public License": "LGPL-2.0",
                "ISC License": "ISC",
                "MIT License": "MIT",
                "Mozilla Public License 1.0": "MPL-1.0",
                "Mozilla Public License 1.1": "MPL-1.1",
                "Mozilla Public License 2.0": "MPL-2.0",
                "Zope Public License": "ZPL"

Obviously, the value "GNU General Public License v2 or later (GPLv2+)"
that was used by this package didn't match any entry in this table.
Since "GNU General Public License v2 or later (GPLv2+)" is apparently
rarely used, I don't think it's worth adding an entry to the table: for
such cases, we simply have to do a manual fixup. In any case,
./utils/scanpipy does not guarantee that it provides a fully working
and correct Buildroot package: it extracts most information from Pipy,
but a careful review, and possibly some changes may be necessary.

Best regards,

Thomas
Yegor Yefremov Nov. 8, 2019, 9:01 a.m. UTC | #4
Moin moin!

On Fri, Nov 8, 2019 at 9:49 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> +Yegor in Cc.
>
> On Fri, 8 Nov 2019 09:45:50 +0100
> Bartosz Bilas <b.bilas@grinn-global.com> wrote:
>
> > >> +PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later (GPLv2+)
> > > The proper way to describe this is just:
> > >
> > > PYTHON_ESPTOOL_LICENSE = GPL-2.0+
> >
> > this was created using scanpypi script so do you think we should fix
> > that script or adjust that manually as you did?
>
> scanpipy already has a conversion table between Pipy-provided license
> strings and Buildroot license tags:
>
>                 'Apache Software License': 'Apache-2.0',
>                 'BSD License': 'FIXME: please specify the exact BSD version',
>                 'European Union Public Licence 1.0': 'EUPL-1.0',
>                 'European Union Public Licence 1.1': 'EUPL-1.1',
>                 "GNU General Public License": "GPL",
>                 "GNU General Public License v2": "GPL-2.0",
>                 "GNU General Public License v2 or later": "GPL-2.0+",
>                 "GNU General Public License v3": "GPL-3.0",
>                 "GNU General Public License v3 or later": "GPL-3.0+",
>                 "GNU Lesser General Public License v2": "LGPL-2.1",
>                 "GNU Lesser General Public License v2 or later": "LGPL-2.1+",
>                 "GNU Lesser General Public License v3": "LGPL-3.0",
>                 "GNU Lesser General Public License v3 or later": "LGPL-3.0+",
>                 "GNU Library or Lesser General Public License": "LGPL-2.0",
>                 "ISC License": "ISC",
>                 "MIT License": "MIT",
>                 "Mozilla Public License 1.0": "MPL-1.0",
>                 "Mozilla Public License 1.1": "MPL-1.1",
>                 "Mozilla Public License 2.0": "MPL-2.0",
>                 "Zope Public License": "ZPL"
>
> Obviously, the value "GNU General Public License v2 or later (GPLv2+)"
> that was used by this package didn't match any entry in this table.
> Since "GNU General Public License v2 or later (GPLv2+)" is apparently
> rarely used, I don't think it's worth adding an entry to the table: for
> such cases, we simply have to do a manual fixup. In any case,
> ./utils/scanpipy does not guarantee that it provides a fully working
> and correct Buildroot package: it extracts most information from Pipy,
> but a careful review, and possibly some changes may be necessary.

And one more thing. This table won't be used if you have installed the
spdx package. But even this is not 100% correct as the license text
doesn't determine whether it is GPL-2.0 or PGL-2.0+. It is stated in
the source code.

The best thing would be if all projects would adhere to REUSE layout
and SPDX identifiers [1].

[1] https://reuse.software/spec/

Best regards,
Yegor
Bartosz Bilas Nov. 8, 2019, 9:06 a.m. UTC | #5
Hello guys,

On 08.11.2019 09:49, Thomas Petazzoni wrote:
> Hello,
>
> +Yegor in Cc.
>
> On Fri, 8 Nov 2019 09:45:50 +0100
> Bartosz Bilas <b.bilas@grinn-global.com> wrote:
>
>>>> +PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later (GPLv2+)
>>> The proper way to describe this is just:
>>>
>>> PYTHON_ESPTOOL_LICENSE = GPL-2.0+
>> this was created using scanpypi script so do you think we should fix
>> that script or adjust that manually as you did?
> scanpipy already has a conversion table between Pipy-provided license
> strings and Buildroot license tags:
>
>                  'Apache Software License': 'Apache-2.0',
>                  'BSD License': 'FIXME: please specify the exact BSD version',
>                  'European Union Public Licence 1.0': 'EUPL-1.0',
>                  'European Union Public Licence 1.1': 'EUPL-1.1',
>                  "GNU General Public License": "GPL",
>                  "GNU General Public License v2": "GPL-2.0",
>                  "GNU General Public License v2 or later": "GPL-2.0+",
>                  "GNU General Public License v3": "GPL-3.0",
>                  "GNU General Public License v3 or later": "GPL-3.0+",
>                  "GNU Lesser General Public License v2": "LGPL-2.1",
>                  "GNU Lesser General Public License v2 or later": "LGPL-2.1+",
>                  "GNU Lesser General Public License v3": "LGPL-3.0",
>                  "GNU Lesser General Public License v3 or later": "LGPL-3.0+",
>                  "GNU Library or Lesser General Public License": "LGPL-2.0",
>                  "ISC License": "ISC",
>                  "MIT License": "MIT",
>                  "Mozilla Public License 1.0": "MPL-1.0",
>                  "Mozilla Public License 1.1": "MPL-1.1",
>                  "Mozilla Public License 2.0": "MPL-2.0",
>                  "Zope Public License": "ZPL"
>
> Obviously, the value "GNU General Public License v2 or later (GPLv2+)"
> that was used by this package didn't match any entry in this table.
> Since "GNU General Public License v2 or later (GPLv2+)" is apparently
> rarely used, I don't think it's worth adding an entry to the table: for
> such cases, we simply have to do a manual fixup. In any case,
> ./utils/scanpipy does not guarantee that it provides a fully working
> and correct Buildroot package: it extracts most information from Pipy,
> but a careful review, and possibly some changes may be necessary.

I assume that's the same for that comment bellow:

 > +config BR2_PACKAGE_PYTHON_ESPTOOL
 > +    bool "python-esptool"
 > +    select BR2_PACKAGE_PYTHON_SERIAL # runtime
 > +    select BR2_PACKAGE_PYTHON_PYAES # runtime
 > +    select BR2_PACKAGE_PYTHON_ECDSA # runtime

Alphabetic ordering.

but I think it wouldn't be difficult to handle it in the script.

Best
Bartek
>
> Best regards,
>
> Thomas
Bartosz Bilas Nov. 8, 2019, 9:17 a.m. UTC | #6
Hello,

I've forgotten about Yegor in Cc.

Best
Bartek
On 08.11.2019 10:06, Bartosz Bilas wrote:
> Hello guys,
>
> On 08.11.2019 09:49, Thomas Petazzoni wrote:
>> Hello,
>>
>> +Yegor in Cc.
>>
>> On Fri, 8 Nov 2019 09:45:50 +0100
>> Bartosz Bilas <b.bilas@grinn-global.com> wrote:
>>
>>>>> +PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later 
>>>>> (GPLv2+)
>>>> The proper way to describe this is just:
>>>>
>>>> PYTHON_ESPTOOL_LICENSE = GPL-2.0+
>>> this was created using scanpypi script so do you think we should fix
>>> that script or adjust that manually as you did?
>> scanpipy already has a conversion table between Pipy-provided license
>> strings and Buildroot license tags:
>>
>>                  'Apache Software License': 'Apache-2.0',
>>                  'BSD License': 'FIXME: please specify the exact BSD 
>> version',
>>                  'European Union Public Licence 1.0': 'EUPL-1.0',
>>                  'European Union Public Licence 1.1': 'EUPL-1.1',
>>                  "GNU General Public License": "GPL",
>>                  "GNU General Public License v2": "GPL-2.0",
>>                  "GNU General Public License v2 or later": "GPL-2.0+",
>>                  "GNU General Public License v3": "GPL-3.0",
>>                  "GNU General Public License v3 or later": "GPL-3.0+",
>>                  "GNU Lesser General Public License v2": "LGPL-2.1",
>>                  "GNU Lesser General Public License v2 or later": 
>> "LGPL-2.1+",
>>                  "GNU Lesser General Public License v3": "LGPL-3.0",
>>                  "GNU Lesser General Public License v3 or later": 
>> "LGPL-3.0+",
>>                  "GNU Library or Lesser General Public License": 
>> "LGPL-2.0",
>>                  "ISC License": "ISC",
>>                  "MIT License": "MIT",
>>                  "Mozilla Public License 1.0": "MPL-1.0",
>>                  "Mozilla Public License 1.1": "MPL-1.1",
>>                  "Mozilla Public License 2.0": "MPL-2.0",
>>                  "Zope Public License": "ZPL"
>>
>> Obviously, the value "GNU General Public License v2 or later (GPLv2+)"
>> that was used by this package didn't match any entry in this table.
>> Since "GNU General Public License v2 or later (GPLv2+)" is apparently
>> rarely used, I don't think it's worth adding an entry to the table: for
>> such cases, we simply have to do a manual fixup. In any case,
>> ./utils/scanpipy does not guarantee that it provides a fully working
>> and correct Buildroot package: it extracts most information from Pipy,
>> but a careful review, and possibly some changes may be necessary.
>
> I assume that's the same for that comment bellow:
>
> > +config BR2_PACKAGE_PYTHON_ESPTOOL
> > +    bool "python-esptool"
> > +    select BR2_PACKAGE_PYTHON_SERIAL # runtime
> > +    select BR2_PACKAGE_PYTHON_PYAES # runtime
> > +    select BR2_PACKAGE_PYTHON_ECDSA # runtime
>
> Alphabetic ordering.
>
> but I think it wouldn't be difficult to handle it in the script.
>
> Best
> Bartek
>>
>> Best regards,
>>
>> Thomas
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni Nov. 8, 2019, 9:21 a.m. UTC | #7
On Fri, 8 Nov 2019 10:06:31 +0100
Bartosz Bilas <b.bilas@grinn-global.com> wrote:


> I assume that's the same for that comment bellow:
> 
>  > +config BR2_PACKAGE_PYTHON_ESPTOOL
>  > +    bool "python-esptool"
>  > +    select BR2_PACKAGE_PYTHON_SERIAL # runtime
>  > +    select BR2_PACKAGE_PYTHON_PYAES # runtime
>  > +    select BR2_PACKAGE_PYTHON_ECDSA # runtime  
> 
> Alphabetic ordering.
> 
> but I think it wouldn't be difficult to handle it in the script.

Indeed, the alphabetic ordering here could I suppose be easily handled
by the script.

Thomas
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index e9f5345520..49440930fc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -259,6 +259,7 @@  N:	Bartosz Bilas <b.bilas@grinn-global.com>
 F:	package/qt5/qt5scxml/
 F:	package/qt5/qt5webview/
 F:	package/python-pyaes
+F:	package/python-esptool
 
 N:	Bartosz Golaszewski <brgl@bgdev.pl>
 F:	package/autoconf-archive/
diff --git a/package/Config.in b/package/Config.in
index 8b554e46d8..a9742ba953 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -902,6 +902,7 @@  menu "External python modules"
 	source "package/python-engineio/Config.in"
 	source "package/python-enum/Config.in"
 	source "package/python-enum34/Config.in"
+	source "package/python-esptool/Config.in"
 	source "package/python-falcon/Config.in"
 	source "package/python-fire/Config.in"
 	source "package/python-flask/Config.in"
diff --git a/package/python-esptool/Config.in b/package/python-esptool/Config.in
new file mode 100644
index 0000000000..10066797a7
--- /dev/null
+++ b/package/python-esptool/Config.in
@@ -0,0 +1,10 @@ 
+config BR2_PACKAGE_PYTHON_ESPTOOL
+	bool "python-esptool"
+	select BR2_PACKAGE_PYTHON_SERIAL # runtime
+	select BR2_PACKAGE_PYTHON_PYAES # runtime
+	select BR2_PACKAGE_PYTHON_ECDSA # runtime
+	help
+	  A serial utility to communicate & flash code to Espressif
+	  ESP8266 & ESP32 chips.
+
+	  https://github.com/espressif/esptool
diff --git a/package/python-esptool/python-esptool.hash b/package/python-esptool/python-esptool.hash
new file mode 100644
index 0000000000..b4dac7ed51
--- /dev/null
+++ b/package/python-esptool/python-esptool.hash
@@ -0,0 +1,5 @@ 
+# md5, sha256 from https://pypi.org/pypi/esptool/json
+md5	d17b9293910773045b9de0d5caa0597d  esptool-2.8.tar.gz
+sha256	1e4288d9f00e55ba36809cc79c493643c623bfa036d7b019a0ebe396284bc317  esptool-2.8.tar.gz
+# Locally computed sha256 checksums
+sha256	8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE
diff --git a/package/python-esptool/python-esptool.mk b/package/python-esptool/python-esptool.mk
new file mode 100644
index 0000000000..a2bd335ac4
--- /dev/null
+++ b/package/python-esptool/python-esptool.mk
@@ -0,0 +1,14 @@ 
+################################################################################
+#
+# python-esptool
+#
+################################################################################
+
+PYTHON_ESPTOOL_VERSION = 2.8
+PYTHON_ESPTOOL_SOURCE = esptool-$(PYTHON_ESPTOOL_VERSION).tar.gz
+PYTHON_ESPTOOL_SITE = https://files.pythonhosted.org/packages/68/91/08c182f66fa3f12a96e754ae8ec7762abb2d778429834638f5746f81977a
+PYTHON_ESPTOOL_SETUP_TYPE = setuptools
+PYTHON_ESPTOOL_LICENSE = GNU General Public License v2 or later (GPLv2+)
+PYTHON_ESPTOOL_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))