Building a (static) binary that runs "everywhere" #1408
Replies: 6 comments 5 replies
-
It's a neat idea. While I tend to stick to pip/pipx installs, I've fiddled with a few different ways of packaging visidata. For pex, this seems to work pretty well:
Or from a local checkout:
Where we need |
Beta Was this translation helpful? Give feedback.
-
Gotcha, that's no fun :-/. On the plus side, this is a use case PyOxy is trying to make easier. It provides single-file Python 3.9 binaries here. I ran an experiment like this and it seemed potentially useful:
That seemed to run the visidata pex file using the PyOxy binary. Still a bit awkward, but maybe friendlier than needing native Python 3 installs on your target machines or going through other packaging tools 🤔 . Worth a shot! |
Beta Was this translation helpful? Give feedback.
-
Oh good call, |
Beta Was this translation helpful? Give feedback.
-
@ajkerrigan @anjakefala @saulpw Do you think it would make sense for Visidata to also be bundled as an AppImage? I just saw another python app doing this: https://github.com/mxmlnkn/ratarmount/blob/master/.github/workflows/appimage.yml |
Beta Was this translation helpful? Give feedback.
-
It can't hurt to try. I've used nuitka for building python tools before, and didn't realize until very recently that standalone binaries built with the There are a bunch of other options to control linking and embedding, maybe you'll find a magic combination that works in your case. I have no useful ideas though sorry, and "works on my machine" wouldn't exactly be a useful test 😅 . |
Beta Was this translation helpful? Give feedback.
-
Slick, static linking and musl seems smart. Looking forward to hearing how it goes! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone tried building a pex file of visidata?
https://github.com/pantsbuild/pex
https://pex.readthedocs.io/en/latest/buildingpex.html#using-pants
This will allow me to just copy a single file to run visidata on remote boxes that have varying python versions.
Beta Was this translation helpful? Give feedback.
All reactions