As a potential solution, or at least a temporary workaround, to make our CLI tools available in buildservice containers, we're tentatively exploring the use of [[ https://github.com/pyinstaller/pyinstaller/tree/v6.9.0 | PyInstaller ]] ([[ https://pyinstaller.org/en/v6.9.0/ | docs ]]) to create standalone executables.
* Suggested by @dcaro as a way to package existing Python CLIs for injection into buildpack images
* PyInstaller bundles the Python runtime, potentially allowing for cross-platform compatibility
* Initial tests show some challenges with glibc version mismatches between build and target environments:
```
slavina@pyre:~$ pyenv global 3.12
slavina@pyre:~$ python --version
slavina@pyre:~$ ./test
[3238867] Failed to load Python shared library '/tmp/_MEIFXJYLl/libpython3.12.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /tmp/_MEIFXJYLl/libpython3.12.so.1.0)
slavina@pyre:~$ ldd --version
ldd (Debian GLIBC 2.36-9+deb12u7) 2.36
```
The binary was built with glibc 2.39 on fedora, and the test was on debian bookworm.
== Next steps ==
# Investigate building the binary in a container matching our buildpack base image (Ubuntu 22.04 LTS)
# Attempt to package one of our existing CLI tools
== Considerations ==
* Requires rebuilding images when CLI tools are updated
* The webservice CLI might need additional testing
* Long-term, we may want to continue efforts on OpenAPI CLI generation for a more stable solution