OK, definitely my most out-there Pants plugin. But...
# random
b
OK, definitely my most out-there Pants plugin. But all signs point to "oh hey it works!" Instead of running Pants, or having Pants run processes, in a Docker container, what if Pants just did a shitty attempt at bringing system packages to the sandbox? At $work, my PoC shows that it's completely possible to have code that does
subprocess.run(["ffmpeg" ...])
or
import pydub
without anything on the system other than the essentials. I'll probably be opening PRs to have Pants make this a smidge simpler, but essentially:
Copy code
[subprocess-environment]
env_vars=[
    "LD_LIBRARY_PATH=.debian/usr/lib",
]

[pex]
executable_search_paths = ["<PATH>", ".debian/usr/bin"]
and 🪄
f
How do you install the "system packages"? One of the key issues with system package managers on linux is that they tend to be hard-coded to require using root to install them, even if you can install them to non-standard locations
b
95% of the time, unpacking and normalizing the .so files "just works" 🙂