ArroyoSystems / arroyo

Distributed stream processing engine in Rust
https://arroyo.dev
Apache License 2.0
3.8k stars 220 forks source link

Add new python feature to make Python support conditional #748

Closed mwylde closed 1 month ago

mwylde commented 1 month ago

To build Arroyo with Python UDF support requires that a suitable version of Python be available for dynamic linking (>= 3.12, with the -dev packages). That may be annoying for developers, as it's another dependency that's needed to get started building the system (even if there's no need for python).

And because libpython is dynamically linked at runtime, we also need a suitable version of it available on the host system. We ensure that's the case for docker images, but may not be available on laptops.

This PR adds a conditional feature (by default disabled) for python support. If a user attempts to use a Python UDF on a build that has it disabled, they will get an appropriate error message.

Long term it would be ideal if this check could be performed at runtime, so there was no need to manage multiple binaries (there is an open issue for this in pyo3: https://github.com/PyO3/pyo3/issues/2668).