* [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2
@ 2021-09-23 18:37 Asaf Kahlon
2021-09-23 18:37 ` [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3 Asaf Kahlon
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Asaf Kahlon @ 2021-09-23 18:37 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Asaf Kahlon
The _next_gen.py file contains python 3.6+ API and it's not
useable with python 2.
In addition, this file is imported on __init__.py only after
checking the version of python is above 3.6, so we can safely
remove it.
Fixes:
- http://autobuild.buildroot.net/results/5774c6237b72b6f5e005bb5b229c078235ff2741/
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
---
package/python-attrs/python-attrs.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/python-attrs/python-attrs.mk b/package/python-attrs/python-attrs.mk
index b99a98501c..f23cabd998 100644
--- a/package/python-attrs/python-attrs.mk
+++ b/package/python-attrs/python-attrs.mk
@@ -11,4 +11,13 @@ PYTHON_ATTRS_SETUP_TYPE = setuptools
PYTHON_ATTRS_LICENSE = MIT
PYTHON_ATTRS_LICENSE_FILES = LICENSE
+# _next_gen is usable only on python 3.6+ and it's not imported
+# on __init__.py in case lower version of python is used.
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+define PYTHON_ATTRS_REMOVE_NEXT_GEN
+ $(RM) $(@D)/src/attr/_next_gen.py
+endef
+PYTHON_ATTRS_POST_PATCH_HOOKS += PYTHON_ATTRS_REMOVE_NEXT_GEN
+endif
+
$(eval $(python-package))
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3
2021-09-23 18:37 [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Asaf Kahlon
@ 2021-09-23 18:37 ` Asaf Kahlon
2021-10-03 19:31 ` Yann E. MORIN
2021-09-23 19:39 ` [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Arnout Vandecappelle
2021-09-23 20:54 ` Romain Naour
2 siblings, 1 reply; 5+ messages in thread
From: Asaf Kahlon @ 2021-09-23 18:37 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Asaf Kahlon
The latest version of this package requires python 3.6+.
Fixes:
- http://autobuild.buildroot.net/results/217157f4dd9fd56d0a13d47e6373f4c478f26757/
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
---
package/python-packaging/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/python-packaging/Config.in b/package/python-packaging/Config.in
index 12170df84e..74d5205e8d 100644
--- a/package/python-packaging/Config.in
+++ b/package/python-packaging/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_PYTHON_PACKAGING
bool "python-packaging"
+ depends on BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_PYPARSING # runtime
help
Core utilities for Python packages.
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2
2021-09-23 18:37 [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Asaf Kahlon
2021-09-23 18:37 ` [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3 Asaf Kahlon
@ 2021-09-23 19:39 ` Arnout Vandecappelle
2021-09-23 20:54 ` Romain Naour
2 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2021-09-23 19:39 UTC (permalink / raw)
To: Asaf Kahlon, buildroot; +Cc: Thomas Petazzoni
On 23/09/2021 20:37, Asaf Kahlon wrote:
> The _next_gen.py file contains python 3.6+ API and it's not
> useable with python 2.
> In addition, this file is imported on __init__.py only after
> checking the version of python is above 3.6, so we can safely
> remove it.
Although this solution is OK, I expect it's only a matter of time before attrs
drops python2 support anyway. So I'd bite the bullet and simply make it depend
on python3.
We're anyway not going to keep python2 around for too long any more, so
progressively dropping python2 support in packages seems like a good idea.
Regards,
Arnout
>
> Fixes:
> - http://autobuild.buildroot.net/results/5774c6237b72b6f5e005bb5b229c078235ff2741/
>
> Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
> ---
> package/python-attrs/python-attrs.mk | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/package/python-attrs/python-attrs.mk b/package/python-attrs/python-attrs.mk
> index b99a98501c..f23cabd998 100644
> --- a/package/python-attrs/python-attrs.mk
> +++ b/package/python-attrs/python-attrs.mk
> @@ -11,4 +11,13 @@ PYTHON_ATTRS_SETUP_TYPE = setuptools
> PYTHON_ATTRS_LICENSE = MIT
> PYTHON_ATTRS_LICENSE_FILES = LICENSE
>
> +# _next_gen is usable only on python 3.6+ and it's not imported
> +# on __init__.py in case lower version of python is used.
> +ifeq ($(BR2_PACKAGE_PYTHON),y)
> +define PYTHON_ATTRS_REMOVE_NEXT_GEN
> + $(RM) $(@D)/src/attr/_next_gen.py
> +endef
> +PYTHON_ATTRS_POST_PATCH_HOOKS += PYTHON_ATTRS_REMOVE_NEXT_GEN
> +endif
> +
> $(eval $(python-package))
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2
2021-09-23 18:37 [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Asaf Kahlon
2021-09-23 18:37 ` [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3 Asaf Kahlon
2021-09-23 19:39 ` [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Arnout Vandecappelle
@ 2021-09-23 20:54 ` Romain Naour
2 siblings, 0 replies; 5+ messages in thread
From: Romain Naour @ 2021-09-23 20:54 UTC (permalink / raw)
To: Asaf Kahlon, buildroot; +Cc: Thomas Petazzoni
Hello Asaf,
On 23/09/2021 20:37, Asaf Kahlon wrote:
> The _next_gen.py file contains python 3.6+ API and it's not
> useable with python 2.
> In addition, this file is imported on __init__.py only after
> checking the version of python is above 3.6, so we can safely
> remove it.
>
> Fixes:
> - http://autobuild.buildroot.net/results/5774c6237b72b6f5e005bb5b229c078235ff2741/
>
It fixes tests.package.test_python_attrs.TestPythonPy2Attrs
https://gitlab.com/kubu93/buildroot/-/jobs/1614446939
Tested-by: Romain Naour <romain.naour@gmail.com>
Best regards,
Romain
> Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
> ---
> package/python-attrs/python-attrs.mk | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/package/python-attrs/python-attrs.mk b/package/python-attrs/python-attrs.mk
> index b99a98501c..f23cabd998 100644
> --- a/package/python-attrs/python-attrs.mk
> +++ b/package/python-attrs/python-attrs.mk
> @@ -11,4 +11,13 @@ PYTHON_ATTRS_SETUP_TYPE = setuptools
> PYTHON_ATTRS_LICENSE = MIT
> PYTHON_ATTRS_LICENSE_FILES = LICENSE
>
> +# _next_gen is usable only on python 3.6+ and it's not imported
> +# on __init__.py in case lower version of python is used.
> +ifeq ($(BR2_PACKAGE_PYTHON),y)
> +define PYTHON_ATTRS_REMOVE_NEXT_GEN
> + $(RM) $(@D)/src/attr/_next_gen.py
> +endef
> +PYTHON_ATTRS_POST_PATCH_HOOKS += PYTHON_ATTRS_REMOVE_NEXT_GEN
> +endif
> +
> $(eval $(python-package))
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3
2021-09-23 18:37 ` [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3 Asaf Kahlon
@ 2021-10-03 19:31 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2021-10-03 19:31 UTC (permalink / raw)
To: Asaf Kahlon; +Cc: Thomas Petazzoni, buildroot
Asaf, All,
On 2021-09-23 21:37 +0300, Asaf Kahlon spake thusly:
> The latest version of this package requires python 3.6+.
>
> Fixes:
> - http://autobuild.buildroot.net/results/217157f4dd9fd56d0a13d47e6373f4c478f26757/
>
> Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
I added a blurb that the only reverse dependency, pytest, already needs
python3, and applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/python-packaging/Config.in | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/python-packaging/Config.in b/package/python-packaging/Config.in
> index 12170df84e..74d5205e8d 100644
> --- a/package/python-packaging/Config.in
> +++ b/package/python-packaging/Config.in
> @@ -1,5 +1,6 @@
> config BR2_PACKAGE_PYTHON_PACKAGING
> bool "python-packaging"
> + depends on BR2_PACKAGE_PYTHON3
> select BR2_PACKAGE_PYTHON_PYPARSING # runtime
> help
> Core utilities for Python packages.
> --
> 2.30.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-03 19:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 18:37 [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Asaf Kahlon
2021-09-23 18:37 ` [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3 Asaf Kahlon
2021-10-03 19:31 ` Yann E. MORIN
2021-09-23 19:39 ` [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Arnout Vandecappelle
2021-09-23 20:54 ` Romain Naour
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.