Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package into a single binary? #227

Closed
tx46 opened this issue Oct 17, 2024 · 5 comments
Closed

package into a single binary? #227

tx46 opened this issue Oct 17, 2024 · 5 comments

Comments

@tx46
Copy link

tx46 commented Oct 17, 2024

i love scli, but i hate that it's not really stand-alone. would it be possible to package it into a single, binary package that runs without having to install deps and/or set up a pyenv? if so, how?

@exquo
Copy link
Collaborator

exquo commented Oct 25, 2024

Signal-cli would probably always need to be installed separately, as it depends on the native libraries. Even if we decided to package the most common x86_64 version with scli, we'd have to keep making new releases just to keep it updated.

Otherwise, installing scli with pip is on the horizon: #129. Would it be good enough for your purposes to just avoid install the other python dependencies?

If your use-case involves frequent reinstalls, or installs on multiple systems, then you can actually make use of python's virtual environments to download all the (recursive) dependencies, that can later be reused.

Finally, there are some third-party packages for (a few) systems.

@tx46
Copy link
Author

tx46 commented Oct 26, 2024

thank you for responding.

for me, it's a patter of package management aesthetics, although you bring up several good points. urwid is also too new in my distro for it to be used with scli, hence i have to revert to using venv, which brings on another plethora of issues as i am syncing binaries between a few different linux machines.

i don't mind having a build step that packages it into a binary (although if there was, then that would likely be done in ci anyway), but i generally dislike having to move 10s or 100s of files split between the app i want to run and dependencies of unusual versions installed all around my system. i'm exaggerating a bit here, but i think you get the idea.

optimally, it would be packaged into a single file (i could even see a python runnable zip-archive as a feasible option).

it just feels "flimsy" and fragile to have all these files, as compared to, say. gurk, which is literally a single binary file.

@exquo
Copy link
Collaborator

exquo commented Oct 28, 2024

urwid is also too new in my distro for it to be used with scli

Scli should work with any version of urwid. (Tested with the latest released v2.6.16). If it does not - that's a bug, and should be a separate issue.

gurk

For a pure-rust project it makes sense to release the compiled binary builds.

It might help if you provide more details on what your use-case is. For most users executing pip install should be simple enough. More involved scenarios would likely need deployment scripts / system orchestration anyway. For offline installations (or to just not have to re-download all the pip dependencies), one can use a local pip index to install offline.

@tx46
Copy link
Author

tx46 commented Oct 30, 2024

on my system (void), urwid is 2.2.3 and 0.14 for readline. last time i tested, it does not run, meaning i have to setup a separate python venv.

as for doing pip install, it is not possible to do on managed systems without setting up a venv, which i want to avoid.

imho, scli is not packaged well (unfortunately true for many python apps).

@exquo
Copy link
Collaborator

exquo commented Nov 25, 2024

on my system (void), urwid is 2.2.3 and 0.14 for readline. last time i tested, it does not run

If you can reproduce it, please open a new issue.

as for doing pip install, it is not possible to do on managed systems without setting up a venv, which i want to avoid.

It should be possible to install pip itself, as well as the packages through it, as a regular (non-root) user.
Note also that using scli and signal-cli on a managed system is not ideal from the privacy perspective, as the system administrators will have access to your messages' history (if enabled in scli) and to your signal-cli's keys.

imho, scli is not packaged well (unfortunately true for many python apps).

It's doable to bundle scli and all of its dependencies (including signal-cli for a particular platform). But that job is better handled by the people responsible for creating packages for a particular distro or other software distribution methods.

@exquo exquo closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants