ArcWelderPlugin icon indicating copy to clipboard operation
ArcWelderPlugin copied to clipboard

Provide precompiled wheels for popular platforms

Open gudvinr opened this issue 2 years ago • 0 comments

It wouldn't be a surprise that many people run OctoPrint on SBC, notably Raspberry Pi of different revisions.

While latest versions of RPi are quite powerful it's still economically feasible to buy older revisions that would be good enough for OctoPrint. And even for latest versions it is still a waste of time and energy when an application (ArcWelder plugin in that case) gets compiled on every device every time you install it when you can do it once.

Standard way for distributing precompiled packages for Python is Wheel which is widely used for popular packages in PyPI.

By utilizing wheels you can significantly reduce installation time especially on weak machines. Some people report x8 reduction of installation time. And because SBCs are generally quite weak compared to desktop machines there is even dedicated wheel repository for Raspberry Pi.

While task of creating wheels sounds rather hard because there are a lot of machines to consider it becomes a lot easier if we consider couple of things by using statistics available on OctoPrint website:

  • x86 hosts that run OctoPrint are usually rare species and those host are quite capable of building packages relatively quick
  • non-Linux hosts also not very popular
  • most of the RPis running 32-bit OS (which is however changing since arm64 version of Raspbery Pi OS only recently became officially supported)
  • Python 2.7 will be unsupported since OctoPrint 1.8.0

So bare minimum of supported platforms is narrowed down to:

  • Linux on 32-bit arm with Python 3

That is what piwheels project does basically. They just compile packages for most popular hardware and that's it.

But you can achieve nearly 100% coverage by also building wheels for Python 3 (considering that Python 2 is now obsolete) on Linux (99% of all installations) for arm64 and x86-64.

gudvinr avatar Feb 05 '22 12:02 gudvinr