Difference between revisions of "Buildroot:Python2Packages"

From eLinux.org
Jump to: navigation, search
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In an effort to follow the Python2 deprecation on the 1st of January 2020, here is a listing of current Buildroot packages that depend on Python2 (as of master during the [[Buildroot:DeveloperDaysELCE2019|Buildroot developer days at ELCE2019]])  
+
In an effort to follow the Python2 deprecation on the 1st of January 2020, here is a listing of current Buildroot packages that depend on Python2 (as of master during the [[https://elinux.org/Buildroot:DeveloperDaysFOSDEM2020|Buildroot developer days at FOSDEM 2020]])  
  
 
== Non Python packages ==
 
== Non Python packages ==
Line 6: Line 6:
  
 
* alsa-lib (install Python module with option BR2_PACKAGE_ALSA_LIB_PYTHON): To be tested
 
* alsa-lib (install Python module with option BR2_PACKAGE_ALSA_LIB_PYTHON): To be tested
* crudini: currently in v0.9, can be bumped to 0.9.3 which adds py3 support
+
* crudini: <s>currently in v0.9, can be bumped to 0.9.3 which adds py3 support. Patch series pending: https://patchwork.ozlabs.org/project/buildroot/list/?series=156917</s> DONE !
* dstat: currently in v0.7.3, can be bumped to v0.7.4 which adds py3 support
+
* <s>dstat: currently in v0.7.3, can be bumped to v0.7.4 which adds py3 support</s> DONE!
* fail2ban: at a first glance, does not seem to support Python3 !
+
* <s>fail2ban: at a first glance, does not seem to support Python3 !</s> Support was added in commit 2d666026385573286371a0f5d9f4b5e0d80f723b
 
* gdb: seems to be compatible with both Python 2 and 3, but not sure since which version
 
* gdb: seems to be compatible with both Python 2 and 3, but not sure since which version
* gnuradio: currently in v3.7.13.5, can be bumped to v3.8+ which supports Python 3
+
* <s> gnuradio: currently in v3.7.13.5, can be bumped to v3.8+ which supports Python 3. Work can resume from these patches: http://patchwork.ozlabs.org/patch/1158469/ and http://patchwork.ozlabs.org/patch/1158470/ New series under review: https://patchwork.ozlabs.org/project/buildroot/list/?series=153798 (+ 1 patch that got lost alone: https://patchwork.ozlabs.org/patch/1224753/)</s> DONE!
 
* jailhouse: no clear indication, but there are some signs towards Python 3 support (https://github.com/siemens/jailhouse/blob/master/pyjailhouse/extendedenum.py#L12-L21)
 
* jailhouse: no clear indication, but there are some signs towards Python 3 support (https://github.com/siemens/jailhouse/blob/master/pyjailhouse/extendedenum.py#L12-L21)
* Kodi: Upstream announces an ongoing effort to move to Python3 in the upcoming v19: https://kodi.wiki/view/Migration_to_Python_3. Only Python2 for now !
+
* <s> Kodi: Upstream announces an ongoing effort to move to Python3 in the upcoming v19: https://kodi.wiki/view/Migration_to_Python_3. Only Python2 for now ! </s> DONE!
 
* libdnet: latest release v1.11 dates back from 2005, and only talks about Py2.3 or 2.4. There is most probably no Python3 support, because the latter was released in 2008
 
* libdnet: latest release v1.11 dates back from 2005, and only talks about Py2.3 or 2.4. There is most probably no Python3 support, because the latter was released in 2008
 
* nmap: the ndiff utility is still tied to Python2, syntactically incompatible with Python3
 
* nmap: the ndiff utility is still tied to Python2, syntactically incompatible with Python3
 
* pcm-tools: the pmu-query script is still tied to Python2, syntactically incompatible with Python3
 
* pcm-tools: the pmu-query script is still tied to Python2, syntactically incompatible with Python3
* supervisor: currently in v3.1.4, support for Python3 was added in v4.0.0 (https://github.com/Supervisor/supervisor/blob/master/CHANGES.rst#400-2019-04-05)
+
* <s>supervisor: currently in v3.1.4, support for Python3 was added in v4.0.0 (https://github.com/Supervisor/supervisor/blob/master/CHANGES.rst#400-2019-04-05)</s> DONE!
 +
* <s>gstreamer1/gst1-validate: Patch for Python3 sent http://patchwork.ozlabs.org/patch/1185306/</s> DONE!
  
 
== Python packages ==
 
== Python packages ==
Line 24: Line 25:
 
== Python in the build system ==
 
== Python in the build system ==
  
These packages use Python in their build process (hence requiring host-python)
+
These packages use Python in their build process, hence requiring host-python (or host-python3). We aim at removing dependencies on host-python(2) where possible, and therefore remove conditionals such as illustrated below. This should instead unconditionnally depend on host-python3 now:
  
* norm: Uses the waf buildsystem. While waf itself now runs on Python3, the wscript is syntactically invalid in Python 3
+
ifeq ($(BR2_PACKAGE_PYTHON)
* jack2: Nearly the same as norm, but fails on a weird StopIteration error
+
FOO_DEPENDENCIES += host-python
 +
else
 +
FOO_DEPENDENCIES += host-python3
 +
endif
 +
 
 +
At the moment, the following packages reference host-python(2). In the following list, the packages that are <u>underlined</u> have been migrated and tested with only host-python3 by Titouan<ref>https://github.com/titouanc/buildroot/compare/master...py3</ref>. This will be posted soon in a series to the mailing list.
 +
 
 +
* <u>ca-certificates</u>
 +
* '''canfestival''': uses its script objdictgen as part of the build process. The whole code base is still syntactically Python3 incompatible
 +
* <u>host-dbus-python</u>
 +
* host-gdb
 +
* <u>gnuradio</u>
 +
* <u>gst1-validate</u>
 +
* <u>host-gtest</u>
 +
* libimxvpuapi
 +
* <u>libsigrock</u>
 +
* libxcb
 +
* midori
 +
* '''nodejs''': the "active" version (12.x.y) does explicitly only support Python2 at the moment<ref>https://github.com/nodejs/node/blob/v12.18.3/BUILDING.md#building-nodejs-on-supported-platforms</ref><ref>https://github.com/nodejs/node/blob/v12.18.0/configure</ref>. The "current" version (14.x.y) can be built with Python3<ref>https://github.com/nodejs/node/blob/v14.6.0/BUILDING.md#building-nodejs-on-supported-platforms</ref>. 14.x.y is expected to become the "active" version on the 2020-10-20 <ref>https://nodejs.org/en/about/releases/</ref>, so we can drop host-python(2) support at that time
 +
* ogre
 +
* <u>host-omniorb</u>
 +
* qpid-proton
 +
* qt5webengine
 +
* qt5webkit
 +
* <u>rust</u>
 +
* sdbusplus
 +
* <u>spidermonkey</u>: Removed! Spidermonkey was only used for Polkit which now used duktape as the backend.
 +
* tvheadend
 +
* webkitgtk
 +
* wpewebkit
 +
* xcb-proto, host-xcb-proto
 +
* zynq-boot-bin
 +
 
 +
=== waf ===
 +
 
 +
The waf-package infrastructure has been fully migrated to host-python3
 +
 
 +
=== Scons ===
 +
 
 +
All packages using SCons (no dedicated infrastructure) have been migrated to host-python3

Revision as of 10:27, 4 August 2021

In an effort to follow the Python2 deprecation on the 1st of January 2020, here is a listing of current Buildroot packages that depend on Python2 (as of master during the [developer days at FOSDEM 2020])

Non Python packages

These packages integrate with Python2: either they contain scripts written in Python, or they install Python libraries as byproducts.

Python packages

(TBD) These packages are Python libraries that can then be imported by Python scripts

Python in the build system

These packages use Python in their build process, hence requiring host-python (or host-python3). We aim at removing dependencies on host-python(2) where possible, and therefore remove conditionals such as illustrated below. This should instead unconditionnally depend on host-python3 now:

ifeq ($(BR2_PACKAGE_PYTHON)
FOO_DEPENDENCIES += host-python
else
FOO_DEPENDENCIES += host-python3
endif

At the moment, the following packages reference host-python(2). In the following list, the packages that are underlined have been migrated and tested with only host-python3 by Titouan[1]. This will be posted soon in a series to the mailing list.

  • ca-certificates
  • canfestival: uses its script objdictgen as part of the build process. The whole code base is still syntactically Python3 incompatible
  • host-dbus-python
  • host-gdb
  • gnuradio
  • gst1-validate
  • host-gtest
  • libimxvpuapi
  • libsigrock
  • libxcb
  • midori
  • nodejs: the "active" version (12.x.y) does explicitly only support Python2 at the moment[2][3]. The "current" version (14.x.y) can be built with Python3[4]. 14.x.y is expected to become the "active" version on the 2020-10-20 [5], so we can drop host-python(2) support at that time
  • ogre
  • host-omniorb
  • qpid-proton
  • qt5webengine
  • qt5webkit
  • rust
  • sdbusplus
  • spidermonkey: Removed! Spidermonkey was only used for Polkit which now used duktape as the backend.
  • tvheadend
  • webkitgtk
  • wpewebkit
  • xcb-proto, host-xcb-proto
  • zynq-boot-bin

waf

The waf-package infrastructure has been fully migrated to host-python3

Scons

All packages using SCons (no dedicated infrastructure) have been migrated to host-python3