Skip to contentSkip to conversation

package/python-markupsafe: bump to version 2.0.1

PATCH Superseded James Hilliard 2 participants 6 messages Oct 24, 2021 – Oct 28, 2021

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 package/python-markupsafe: bump to version 2.0.1

Drop python2 support.

Remove python3-markupsafe host build as python2 host builds for markupsafe are not supported, python3 host builds are moved to python-markupsafe.

Remove python3-jinja2 host build as python2 host builds for jinja2 are not supported, python3 host builds are moved to python-jinja2.

Propagate reverse python3 dependency.

---
Changes v1 -> v2:
- move python3-jinja2 removal to same patch as python3-markupsafe removal

---
 package/libcamera/libcamera.mk                |  2 +-
 package/python-flask-babel/Config.in          |  1 +
 package/python-flask-cors/Config.in           |  1 +
 package/python-flask-expects-json/Config.in   |  1 +
 package/python-flask-jsonrpc/Config.in        |  1 +
 package/python-flask-login/Config.in          |  1 +
 package/python-flask-sqlalchemy/Config.in     |  1 +
 package/python-flask/Config.in                |  1 +
 package/python-jinja2/Config.in               |  3 +--
 package/python-jinja2/python-jinja2.mk        | 16 +++------------
 package/python-markupsafe/Config.in           |  1 +
 .../python-markupsafe/python-markupsafe.hash  |  9 +++++----
 .../python-markupsafe/python-markupsafe.mk    |  7 ++++---
 package/python-wtforms/Config.in              |  1 +
 package/python3-jinja2/python3-jinja2.hash    |  1 -
 package/python3-jinja2/python3-jinja2.mk      | 20 -------------------
 .../python3-markupsafe.hash                   |  1 -
 .../python3-markupsafe/python3-markupsafe.mk  | 16 ---------------
 package/systemd/systemd.mk                    |  4 ++--
 19 files changed, 25 insertions(+), 63 deletions(-)
 delete mode 120000 package/python3-jinja2/python3-jinja2.hash
 delete mode 100644 package/python3-jinja2/python3-jinja2.mk
 delete mode 120000 package/python3-markupsafe/python3-markupsafe.hash
 delete mode 100644 package/python3-markupsafe/python3-markupsafe.mk
package/libcamera/libcamera.mk +1 -1
index 5a5f2800b9..0052ca558a 100644
@@ -10,7 +10,7 @@ LIBCAMERA_SITE_METHOD = git
 LIBCAMERA_DEPENDENCIES = \
 	host-openssl \
 	host-pkgconf \
-	host-python3-jinja2 \
+	host-python-jinja2 \
 	host-python3-ply \
 	host-python3-pyyaml \
 	gnutls
package/python-flask-babel/Config.in +1 -0
index 272d9ef1c1..52f05f1e6a 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK_BABEL
 	bool "python-flask-babel"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_FLASK # runtime
 	select BR2_PACKAGE_PYTHON_BABEL # runtime
 	select BR2_PACKAGE_PYTHON_JINJA2 # runtime
package/python-flask-cors/Config.in +1 -0
index e2e84797f9..f34f77e5b0 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK_CORS
 	bool "python-flask-cors"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_FLASK # runtime
 	select BR2_PACKAGE_PYTHON_SIX # runtime
 	help
package/python-flask-expects-json/Config.in +1 -0
index 901234762e..efe4c248d3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK_EXPECTS_JSON
 	bool "python-flask-expects-json"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_FLASK # runtime
 	select BR2_PACKAGE_PYTHON_JSONSCHEMA # runtime
 	help
package/python-flask-jsonrpc/Config.in +1 -0
index c8ecd854b3..4bc13f9bcb 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK_JSONRPC
 	bool "python-flask-jsonrpc"
+	depends on BR2_PACKAGE_PYTHON3
 	# runtime dependency
 	select BR2_PACKAGE_PYTHON_FLASK
 	help
package/python-flask-login/Config.in +1 -0
index 88c413e2a2..00fa58d783 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK_LOGIN
 	bool "python-flask-login"
+	depends on BR2_PACKAGE_PYTHON3
 	# runtime dependency
 	select BR2_PACKAGE_PYTHON_FLASK
 	help
package/python-flask-sqlalchemy/Config.in +1 -0
index fa4a035110..e96bd7078c 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK_SQLALCHEMY
 	bool "python-flask-sqlalchemy"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_FLASK # runtime
 	select BR2_PACKAGE_PYTHON_SQLALCHEMY # runtime
 	help
package/python-flask/Config.in +1 -0
index 0e5b64ce59..56bfe10f01 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_FLASK
 	bool "python-flask"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_CLICK # runtime
 	select BR2_PACKAGE_PYTHON_JINJA2 # runtime
 	select BR2_PACKAGE_PYTHON_WERKZEUG # runtime
package/python-jinja2/Config.in +1 -2
index 5b99df75b8..36a68083e6 100644
@@ -1,8 +1,7 @@
 config BR2_PACKAGE_PYTHON_JINJA2
 	bool "python-jinja2"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_MARKUPSAFE # runtime
-	select BR2_PACKAGE_PYTHON_UNICODEDATA if BR2_PACKAGE_PYTHON
-	select BR2_PACKAGE_PYTHON3_UNICODEDATA if BR2_PACKAGE_PYTHON3
 	help
 	  Jinja2 is a template engine written in pure Python. It
 	  provides a Django inspired non-XML syntax but supports
package/python-jinja2/python-jinja2.mk +3 -13
index f91cac6937..e3f47f953a 100644
@@ -4,7 +4,6 @@
 #
 ################################################################################
 
-# Please keep in sync with package/python3-jinja2/python3-jinja2.mk
 PYTHON_JINJA2_VERSION = 2.11.3
 PYTHON_JINJA2_SOURCE = Jinja2-$(PYTHON_JINJA2_VERSION).tar.gz
 PYTHON_JINJA2_SITE = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7
@@ -14,20 +13,11 @@ PYTHON_JINJA2_LICENSE_FILES = LICENSE.rst
 PYTHON_JINJA2_CPE_ID_VENDOR = pocoo
 PYTHON_JINJA2_CPE_ID_PRODUCT = jinja2
 
-# In host build, setup.py tries to download markupsafe if it is not installed
+# In host/target build, setup.py tries to download markupsafe if it is not installed
+PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
 HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
 
-# Both asyncsupport.py and asyncfilters.py use async feature, that is
-# not available in Python 2 and some features available in Python 3.6.
-# So in both cases *.py compilation would produce compiler errors.
-# Hence remove both files after package extraction.
-ifeq ($(BR2_PACKAGE_PYTHON),y)
-define PYTHON_JINJA2_REMOVE_ASYNC_SUPPORT
-	rm $(@D)/src/jinja2/asyncsupport.py $(@D)/src/jinja2/asyncfilters.py
-endef
-
-PYTHON_JINJA2_POST_EXTRACT_HOOKS = PYTHON_JINJA2_REMOVE_ASYNC_SUPPORT
-endif
+HOST_PYTHON_JINJA2_NEEDS_HOST_PYTHON = python3
 
 $(eval $(python-package))
 $(eval $(host-python-package))
package/python-markupsafe/Config.in +1 -0
index 48421e0a32..cd7cb2d8e9 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_MARKUPSAFE
 	bool "python-markupsafe"
+	depends on BR2_PACKAGE_PYTHON3
 	help
 	  MarkupSafe implements a XML/HTML/XHTML Markup safe string
 	  for Python.
package/python-markupsafe/python-markupsafe.hash +5 -4
index df07662a86..520bb405fb 100644
@@ -1,4 +1,5 @@
-# md5 from https://pypi.python.org/pypi/markupsafe/json, sha256 locally computed
-md5	43fd756864fe42063068e092e220c57b  MarkupSafe-1.1.1.tar.gz
-sha256	29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b  MarkupSafe-1.1.1.tar.gz
-sha256	489a8e1108509ed98a37bb983e11e0f7e1d31f0bd8f99a79c8448e7ff37d07ea  LICENSE.rst
+# md5, sha256 from https://pypi.org/pypi/markupsafe/json
+md5  892e0fefa3c488387e5cc0cad2daa523  MarkupSafe-2.0.1.tar.gz
+sha256  594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a  MarkupSafe-2.0.1.tar.gz
+# Locally computed sha256 checksums
+sha256  489a8e1108509ed98a37bb983e11e0f7e1d31f0bd8f99a79c8448e7ff37d07ea  LICENSE.rst
package/python-markupsafe/python-markupsafe.mk +4 -3
index f067d94f34..14a8d06dfe 100644
@@ -4,13 +4,14 @@
 #
 ################################################################################
 
-# Please keep in sync with package/python3-markupsafe/python3-markupsafe.mk
-PYTHON_MARKUPSAFE_VERSION = 1.1.1
+PYTHON_MARKUPSAFE_VERSION = 2.0.1
 PYTHON_MARKUPSAFE_SOURCE = MarkupSafe-$(PYTHON_MARKUPSAFE_VERSION).tar.gz
-PYTHON_MARKUPSAFE_SITE = https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094
+PYTHON_MARKUPSAFE_SITE = https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e
 PYTHON_MARKUPSAFE_SETUP_TYPE = setuptools
 PYTHON_MARKUPSAFE_LICENSE = BSD-3-Clause
 PYTHON_MARKUPSAFE_LICENSE_FILES = LICENSE.rst
 
+HOST_PYTHON_MARKUPSAFE_NEEDS_HOST_PYTHON = python3
+
 $(eval $(python-package))
 $(eval $(host-python-package))
package/python-wtforms/Config.in +1 -0
index 33a17d3d37..0cc136fc13 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_WTFORMS
 	bool "python-wtforms"
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_MARKUPSAFE # runtime
 	help
 	  A flexible forms validation and rendering library for
package/python3-jinja2/python3-jinja2.hash deleted +0 -1
deleted file mode 120000
index 543e981aa0..0000000000
@@ -1 +0,0 @@
-../python-jinja2/python-jinja2.hash
\ No newline at end of file
package/python3-jinja2/python3-jinja2.mk deleted +0 -20
deleted file mode 100644
index 5d29e1d889..0000000000
@@ -1,20 +0,0 @@
-################################################################################
-#
-# python3-jinja2
-#
-################################################################################
-
-PYTHON3_JINJA2_VERSION = 2.11.3
-PYTHON3_JINJA2_SOURCE = Jinja2-$(PYTHON3_JINJA2_VERSION).tar.gz
-PYTHON3_JINJA2_SITE = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7
-PYTHON3_JINJA2_SETUP_TYPE = setuptools
-PYTHON3_JINJA2_LICENSE = BSD-3-Clause
-PYTHON3_JINJA2_LICENSE_FILES = LICENSE.rst
-PYTHON3_JINJA2_CPE_ID_VENDOR = pocoo
-PYTHON3_JINJA2_CPE_ID_PRODUCT = jinja2
-
-HOST_PYTHON3_JINJA2_NEEDS_HOST_PYTHON = python3
-# In host build, setup.py tries to download markupsafe if it is not installed
-HOST_PYTHON3_JINJA2_DEPENDENCIES = host-python3-markupsafe
-
-$(eval $(host-python-package))
package/python3-markupsafe/python3-markupsafe.hash deleted +0 -1
deleted file mode 120000
index 947cfa12d7..0000000000
@@ -1 +0,0 @@
-../python-markupsafe/python-markupsafe.hash
\ No newline at end of file
package/python3-markupsafe/python3-markupsafe.mk deleted +0 -16
deleted file mode 100644
index 58f6e67b64..0000000000
@@ -1,16 +0,0 @@
-################################################################################
-#
-# python3-markupsafe
-#
-################################################################################
-
-PYTHON3_MARKUPSAFE_VERSION = 1.1.1
-PYTHON3_MARKUPSAFE_SOURCE = MarkupSafe-$(PYTHON3_MARKUPSAFE_VERSION).tar.gz
-PYTHON3_MARKUPSAFE_SITE = https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094
-PYTHON3_MARKUPSAFE_SETUP_TYPE = setuptools
-PYTHON3_MARKUPSAFE_LICENSE = BSD-3-Clause
-PYTHON3_MARKUPSAFE_LICENSE_FILES = LICENSE.rst
-
-HOST_PYTHON3_MARKUPSAFE_NEEDS_HOST_PYTHON = python3
-
-$(eval $(host-python-package))
package/systemd/systemd.mk +2 -2
index c403896759..5b4fd57cd3 100644
@@ -14,7 +14,7 @@ SYSTEMD_DEPENDENCIES = \
 	$(BR2_COREUTILS_HOST_DEPENDENCY) \
 	$(if $(BR2_PACKAGE_BASH_COMPLETION),bash-completion) \
 	host-gperf \
-	host-python3-jinja2 \
+	host-python-jinja2 \
 	kmod \
 	libcap \
 	util-linux-libs \
@@ -739,7 +739,7 @@ HOST_SYSTEMD_DEPENDENCIES = \
 	host-patchelf \
 	host-libcap \
 	host-gperf \
-	host-python3-jinja2
+	host-python-jinja2
 
 HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
 
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v2 2/2 package/python-jinja2: bump to version 3.0.2

---
 package/python-jinja2/python-jinja2.hash | 4 ++--
 package/python-jinja2/python-jinja2.mk   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
package/python-jinja2/python-jinja2.hash +2 -2
index 51590b17d2..afd07e89f1 100644
@@ -1,5 +1,5 @@
 # md5, sha256 from https://pypi.org/pypi/jinja2/json
-md5  231dc00d34afb2672c497713fa9cdaaa  Jinja2-2.11.3.tar.gz
-sha256  a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6  Jinja2-2.11.3.tar.gz
+md5  059f89375d7ea60eb7013f341f0b89e7  Jinja2-3.0.2.tar.gz
+sha256  827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45  Jinja2-3.0.2.tar.gz
 # Locally computed sha256 checksums
 sha256  3b49dcee4105eb37bac10faf1be260408fe85d252b8e9df2e0979fc1e094437b  LICENSE.rst
package/python-jinja2/python-jinja2.mk +2 -2
index e3f47f953a..bb53f95699 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-PYTHON_JINJA2_VERSION = 2.11.3
+PYTHON_JINJA2_VERSION = 3.0.2
 PYTHON_JINJA2_SOURCE = Jinja2-$(PYTHON_JINJA2_VERSION).tar.gz
-PYTHON_JINJA2_SITE = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7
+PYTHON_JINJA2_SITE = https://files.pythonhosted.org/packages/f8/86/7c0eb6e8b05385d1ce682abc0f994abd1668e148fb52603fa86e15d4c110
 PYTHON_JINJA2_SETUP_TYPE = setuptools
 PYTHON_JINJA2_LICENSE = BSD-3-Clause
 PYTHON_JINJA2_LICENSE_FILES = LICENSE.rst
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to James Hilliard

Hi James,

Quoted 11 lines · James Hilliard

Drop python2 support.

Remove python3-markupsafe host build as python2 host builds for markupsafe are not supported, python3 host builds are moved to python-markupsafe.

Remove python3-jinja2 host build as python2 host builds for jinja2 are not supported, python3 host builds are moved to python-jinja2.

Propagate reverse python3 dependency.

That turns out to be difficult...

There is one dependency you missed: host-python-mako depends on
host-python-markupsafe. Since the latter is python3-only, that means that host-python-mako also becomes python3-only.

And host-python-mako has a bunch of reverse dependencies:

- gnuradio: we need to add a depends on !BR2_PACKAGE_PYTHON;
- jailhouse: the helper scripts are currently marked as python2-only, so they just become unavailable. But maybe they already do support python3.
- piglit: already python3-only;
- sdbusplus: already python3-only;
- uhd: we need to add a depends on !BR2_PACKAGE_PYTHON.

Alternatively, we could patch python-mako to avoid the dependency on
host-python-markupsafe.

And then there's a similar problem for python-jinja2. Fortunately in that
case, it's just systemd that is affected, but it means that systemd is not supported with python2. And that is a really tricky dependency to add, because you really don't want that selecting BR2_PACKAGE_PYTHON suddenly causes the init system to change. So we'd have to revert that dependency and instead make python2 depend on !BR2_PACKAGE_SYSTEMD. Fortunately there's no longer anything that select BR2_PACKAGE_PYTHON, so nothing to propagate...

Final alternatives: get rid of python2 with more expedience. Getting rid of it
completely would be nice of course. An in-between solution would be to no longer support host-python modules, i.e. even if you build python2, all host-python-modules are still built for python3 instead. It's also a big one, probably some stuff will break, but the autobuilders will find out.

Regards,
Arnout

[snip]
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
Quoted 14 lines · Arnout Vandecappelle

Hi James,

Quoted 10 lines · James Hilliard

Drop python2 support.

Remove python3-markupsafe host build as python2 host builds for markupsafe are not supported, python3 host builds are moved to python-markupsafe.

Remove python3-jinja2 host build as python2 host builds for jinja2 are not supported, python3 host builds are moved to python-jinja2.

Quoted 7 lines
Quoted 1 line

Propagate reverse python3 dependency.

That turns out to be difficult...

There is one dependency you missed: host-python-mako depends on
host-python-markupsafe. Since the latter is python3-only, that means that host-python-mako also becomes python3-only.

Ok, I'll propagate to that as well and consolidate it like with jinja2.

Quoted 6 lines

And host-python-mako has a bunch of reverse dependencies:

- gnuradio: we need to add a depends on !BR2_PACKAGE_PYTHON;
- jailhouse: the helper scripts are currently marked as python2-only, so they just become unavailable. But maybe they already do support python3.

Yeah, seems they support both python2 and python3 now.

Quoted 3 lines

- piglit: already python3-only;
- sdbusplus: already python3-only;
- uhd: we need to add a depends on !BR2_PACKAGE_PYTHON.

Hmm, seems the python API for that already depends on BR2_PACKAGE_PYTHON3.

Guess the host dependency just needs to be appropriately set.

Quoted 5 lines

Alternatively, we could patch python-mako to avoid the dependency on
host-python-markupsafe.

Quoted 7 lines

And then there's a similar problem for python-jinja2. Fortunately in that
case, it's just systemd that is affected, but it means that systemd is not supported with python2. And that is a really tricky dependency to add, because you really don't want that selecting BR2_PACKAGE_PYTHON suddenly causes the init system to change. So we'd have to revert that dependency and instead make python2 depend on !BR2_PACKAGE_SYSTEMD. Fortunately there's no longer anything that select BR2_PACKAGE_PYTHON, so nothing to propagate...

Isn't it just a build dependency for systemd? Unconditionally using the host python3
only version should be fine I think.

Quoted 9 lines

Final alternatives: get rid of python2 with more expedience. Getting rid of it
completely would be nice of course. An in-between solution would be to no longer support host-python modules, i.e. even if you build python2, all host-python-modules are still built for python3 instead. It's also a big one, probably some stuff will break, but the autobuilders will find out.

Quoted 5 lines

Regards,
Arnout

[snip]

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
Quoted 55 lines · James Hilliard
Quoted 14 lines · Arnout Vandecappelle

Hi James,

Quoted 10 lines · James Hilliard

Drop python2 support.

Remove python3-markupsafe host build as python2 host builds for markupsafe are not supported, python3 host builds are moved to python-markupsafe.

Remove python3-jinja2 host build as python2 host builds for jinja2 are not supported, python3 host builds are moved to python-jinja2.

Quoted 7 lines
Quoted 1 line

Propagate reverse python3 dependency.

That turns out to be difficult...

There is one dependency you missed: host-python-mako depends on
host-python-markupsafe. Since the latter is python3-only, that means that host-python-mako also becomes python3-only.

Ok, I'll propagate to that as well and consolidate it like with jinja2.

Quoted 6 lines

And host-python-mako has a bunch of reverse dependencies:

- gnuradio: we need to add a depends on !BR2_PACKAGE_PYTHON;
- jailhouse: the helper scripts are currently marked as python2-only, so they just become unavailable. But maybe they already do support python3.

Yeah, seems they support both python2 and python3 now.

Quoted 3 lines

- piglit: already python3-only;
- sdbusplus: already python3-only;
- uhd: we need to add a depends on !BR2_PACKAGE_PYTHON.

Hmm, seems the python API for that already depends on BR2_PACKAGE_PYTHON3.

Guess the host dependency just needs to be appropriately set.

Quoted 5 lines

Alternatively, we could patch python-mako to avoid the dependency on
host-python-markupsafe.

Quoted 7 lines

And then there's a similar problem for python-jinja2. Fortunately in that
case, it's just systemd that is affected, but it means that systemd is not supported with python2. And that is a really tricky dependency to add, because you really don't want that selecting BR2_PACKAGE_PYTHON suddenly causes the init system to change. So we'd have to revert that dependency and instead make python2 depend on !BR2_PACKAGE_SYSTEMD. Fortunately there's no longer anything that select BR2_PACKAGE_PYTHON, so nothing to propagate...

Quoted 1 line

Isn't it just a build dependency for systemd?

Yes it's a build dependency. Same for the others I mentioned, BTW. However,
when BR2_PACKAGE_PYTHON is selected, all host-python-modules are built for python2, not for python3. That's why the python3-foo packages are introduced.

Regards,
Arnout

Quoted 18 lines

Unconditionally using
the host python3
only version should be fine I think.

Quoted 14 lines

Final alternatives: get rid of python2 with more expedience. Getting rid of it
completely would be nice of course. An in-between solution would be to no longer support host-python modules, i.e. even if you build python2, all host-python-modules are still built for python3 instead. It's also a big one, probably some stuff will break, but the autobuilders will find out.

Regards,
Arnout

[snip]

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
Quoted 59 lines · Arnout Vandecappelle
Quoted 55 lines · James Hilliard
Quoted 14 lines · Arnout Vandecappelle

Hi James,

Quoted 10 lines · James Hilliard

Drop python2 support.

Remove python3-markupsafe host build as python2 host builds for markupsafe are not supported, python3 host builds are moved to python-markupsafe.

Remove python3-jinja2 host build as python2 host builds for jinja2 are not supported, python3 host builds are moved to python-jinja2.

Quoted 7 lines
Quoted 1 line

Propagate reverse python3 dependency.

That turns out to be difficult...

There is one dependency you missed: host-python-mako depends on
host-python-markupsafe. Since the latter is python3-only, that means that host-python-mako also becomes python3-only.

Ok, I'll propagate to that as well and consolidate it like with jinja2.

Quoted 6 lines

And host-python-mako has a bunch of reverse dependencies:

- gnuradio: we need to add a depends on !BR2_PACKAGE_PYTHON;
- jailhouse: the helper scripts are currently marked as python2-only, so they just become unavailable. But maybe they already do support python3.

Yeah, seems they support both python2 and python3 now.

Quoted 3 lines

- piglit: already python3-only;
- sdbusplus: already python3-only;
- uhd: we need to add a depends on !BR2_PACKAGE_PYTHON.

Hmm, seems the python API for that already depends on BR2_PACKAGE_PYTHON3.

Guess the host dependency just needs to be appropriately set.

Quoted 12 lines

Alternatively, we could patch python-mako to avoid the dependency on
host-python-markupsafe.

And then there's a similar problem for python-jinja2. Fortunately in that
case, it's just systemd that is affected, but it means that systemd is not supported with python2. And that is a really tricky dependency to add, because you really don't want that selecting BR2_PACKAGE_PYTHON suddenly causes the init system to change. So we'd have to revert that dependency and instead make python2 depend on !BR2_PACKAGE_SYSTEMD. Fortunately there's no longer anything that select BR2_PACKAGE_PYTHON, so nothing to propagate...

Quoted 5 lines
Quoted 1 line

Isn't it just a build dependency for systemd?

Yes it's a build dependency. Same for the others I mentioned, BTW. However,
when BR2_PACKAGE_PYTHON is selected, all host-python-modules are built for python2, not for python3. That's why the python3-foo packages are introduced.

Doesn't this override that behavior?:
HOST_PYTHON_JINJA2_NEEDS_HOST_PYTHON = python3

Quoted 24 lines

Regards,
Arnout

Quoted 18 lines

Unconditionally using
the host python3
only version should be fine I think.

Quoted 14 lines

Final alternatives: get rid of python2 with more expedience. Getting rid of it
completely would be nice of course. An in-between solution would be to no longer support host-python modules, i.e. even if you build python2, all host-python-modules are still built for python3 instead. It's also a big one, probably some stuff will break, but the autobuilders will find out.

Regards,
Arnout

[snip]

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot