Difference between revisions of "Buildroot:Python2Packages"

From eLinux.org
Jump to: navigation, search
m (Scons)
m (Python in the build system)
Line 25: 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:
  
=== waf ===
+
ifeq ($(BR2_PACKAGE_PYTHON)
 +
FOO_DEPENDENCIES += host-python
 +
else
 +
FOO_DEPENDENCIES += host-python3
 +
endif
  
The waf build system in itself is now compatible with Python3; <s>but the wscript (build definition file) provided by some packages is still syntactically incompatible with Python3. Because Buildroot has a dedicated waf infrastructure, it is difficult to handle each of these packages individually: the `waf-package` infrastructure in itself depends on host-python, and we cannot upgrade it to host-python3 until all the waf packages can actually be built under Python3 only</s>. Buildroot currently has the following waf-based packages, and all of them are now Python3 ready:
+
At the moment, the following packages reference host-python(2)
  
* aubio
+
* ca-certificates
* jack2
+
* canfestival
* mpv
+
* host-dbus-python
* norm (patch series pending: https://patchwork.ozlabs.org/project/buildroot/list/?series=156705)
+
* host-gdb
* glmark2
+
* gnuradio
* libimxvpuapi <s>(patch pending: https://patchwork.ozlabs.org/patch/1233460/)</s> DONE !
+
* gst1-validate
* gstreamer1/gst1-imx <s>(patch pending: https://patchwork.ozlabs.org/patch/1233580/)</s> DONE !
+
* host-gtest
 +
* libimxvpuapi
 +
* libsigrock
 +
* libxcb
 +
* midori
 +
* nodejs
 +
* ogre
 +
* host-omniorb
 +
* qpid-proton
 +
* qt5webengine
 +
* qt5webkit
 +
* rust
 +
* sdbusplus
 +
* spidermonkey
 +
* tvheadend
 +
* webkitgtk
 +
* wpewebkit
 +
* xcb-proto, host-xcb-proto
 +
* zynq-boot-bin
  
We can therefore now make the waf-package infrastructure use Python3, as submitted in this patch: https://patchwork.ozlabs.org/patch/1233581/
+
=== waf ===
 +
 
 +
The waf-package infrastructure has been fully migrated to host-python3
  
 
=== Scons ===
 
=== Scons ===
  
Similarly to waf, SCons in itself is compatible with Python3, but build definition files can be Python3 incompatible. However, because there is no dedicated SCons infrastructure, each package can be handled individually. Buildroot currently has the following SCons based packages:
+
All packages using SCons (no dedicated infrastructure) have been migrated to host-python3
 
 
* <s>alljoyn, alljoyn-base, alljoyn-tcl, alljoyn-tcl-base: Upstream seems dead, Patch for removal sent: http://patchwork.ozlabs.org/patch/1186692/</s> REMOVED!
 
* <s>benejson: Patch sent sent for upgrade to host-python3 http://patchwork.ozlabs.org/patch/1185105/</s> DONE!
 
* <s>gpsd: Patch sent for upgrade to host-python3 http://patchwork.ozlabs.org/patch/1185026/</s> DONE!
 
* <s>mongodb: Patch series pending: http://patchwork.ozlabs.org/project/buildroot/list/?series=138894</s> DONE !
 
 
 
All SCons based packages in Buildroot can now be built with Python3, and the host-scons package has been updated accordingly (in this series https://patchwork.ozlabs.org/project/buildroot/patch/20200714033927.1516172-1-hancock@sedsystems.ca/)
 

Revision as of 15:57, 21 July 2020

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)

  • ca-certificates
  • canfestival
  • host-dbus-python
  • host-gdb
  • gnuradio
  • gst1-validate
  • host-gtest
  • libimxvpuapi
  • libsigrock
  • libxcb
  • midori
  • nodejs
  • ogre
  • host-omniorb
  • qpid-proton
  • qt5webengine
  • qt5webkit
  • rust
  • sdbusplus
  • spidermonkey
  • 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