whipper icon indicating copy to clipboard operation
whipper copied to clipboard

Pyinstaller build for Linux (other OSes should follow after the ports are done)

Open MerlijnWajer opened this issue 8 years ago • 11 comments

We could make the distribution and usage of whipper easier by using Pyinstaller. It can take a python project, with lots of dlls and dependencies, and turn it into a single self-extracting binary. That may make distribution easier, and we could even ship our own cdparanoia/cdrdao (if we ever want/need to).

I've done something like this before, and it should in fact not be super hard.

Other platforms besides Linux will likely benefit more, but let's start with Linux.

MerlijnWajer avatar Dec 03 '16 16:12 MerlijnWajer

Does it work with C source code that we have to compile? (I'm thinking about the accuraterip-checksum.c program)

I was thinking about packaging and thought we could also give snapcraft a try maybe? (it's Linux only and I don't think there are plans to port this to other OSes though)

pieqq avatar Dec 19 '16 14:12 pieqq

Yes. pyinstaller will include any amount of files or binaries, and possibly add them to your $PATH, etc. I have this working in a project, with morituri, already.

MerlijnWajer avatar Dec 19 '16 15:12 MerlijnWajer

As for general packaging, I would go for the distro-native ways. E.g. on Gentoo an ebuild, the deb stuff for Debian, and so on. If this turns out to be annoying, and snapcraft solves those annoyances, fine.

My goal with pyinstaller is to have a simple downloadable way to get the package, also for Windows/OS-X (when we get there). I am sure distros do not want pyinstaller-like large files, as they will do the dependency management themselves.

MerlijnWajer avatar Dec 19 '16 15:12 MerlijnWajer

As for general packaging, I would go for the distro-native ways. E.g. on Gentoo an ebuild, the deb stuff for Debian, and so on.

That's my opinion too.

JoeLametta avatar Dec 20 '16 17:12 JoeLametta

Agree with keeping it native, snappy/appimage/flatpak and the like can be a hassle sometimes since their package updates aren't synchronized with the distro's package updates, and therefore might leave an app outdated.

The Pyinstaller idea seems very nice though.

IvanDSM avatar Dec 20 '16 21:12 IvanDSM

snap is the way to go for Ubuntu.

their package updates aren't synchronized with the distro's package updates, and therefore might leave an app outdated.

For snap, the main purpose is so that application developers can package and release their apps as needed and don't have to wait for approval by the distro staff. I think it's valuable in the case of a user-oriented software like whipper since by using snap you can release new versions quickly if needed, instead of having a very old version that has been validated once a long time ago and is completely outdated.

That said, any packaging method will be better than the current install process :)

pieqq avatar Dec 21 '16 02:12 pieqq

That said, any packaging method will be better than the current install process :)

Were you not able to install it via your package manager? I don't think the current process is that arcane anymore, especially now that submodules are gone.

RecursiveForest avatar Dec 27 '16 03:12 RecursiveForest

I installed it a month ago following the README. It was more or less straightforward, but it's definitely not user-friendly. What I meant with my previous comment is that if it's in a PPA for instance, Ubuntu users can install it very easily (and if it's a snap, it can actually be pushed to the software center, making it even easier to install).

pieqq avatar Jan 02 '17 00:01 pieqq

I understand. Do you understand what pyinstaller does? It creates a single binary - with everything in it. It's a simple download and run. No dependencies to install, no nothing.

It doesn't create an 'installer' for your application.

Distros can still package it in any way they want, include 'snaps', but let's make separate issues for that.

MerlijnWajer avatar Jan 02 '17 20:01 MerlijnWajer

I understand. Do you understand what pyinstaller does? It creates a single binary - with everything in it. It's a simple download and run. No dependencies to install, no nothing.

Sounds good to me!

pieqq avatar Jan 03 '17 02:01 pieqq

First steps that should be done is making whipper installable via pypi and therefore available within python virtualenvs without hassle. The step making distro related packages is then an easy step afterwards, as some distros have helper tools e.g. debian's dh_pythonX helper tools or pythons builtin bdist_rpm flag. Pypi support is also a todo step for dependent packages like the currently broken setup.py of PyCMDB package and the missing requirements.txt file in whipper itself!

With pip/virtualenv support a much broader range of developers could be reached!

gthieleb avatar Jan 12 '17 13:01 gthieleb