Krapplet, is coming nicely along. I have just released version 0.2.0 with some enhancements and a few bug fixes. It is nice to write some awesome piece of software, but it would also be great if people would use it. For people to use it they first would have to notice it, and then it should be easy to also install it on their system. My hope is by packaging krappet for multiple Linux distros that I achieve both of those objectives.
PyPI
Krapplet is written in Python, so getting krapplet published on the Python Package Index PyPI was the logical first step. Packaging for PyPI requires that it is setup with setuptools. This article explains the structure, and this tutoral was also very useful. Krapplet on PyPI can be found here.
PyPI is nice but it has the major drawback that it is intended only for Python packages. And whereas krapplet is purely written in Python, it uses also software that is not in Python, and not on PyPI. The consequence is that these dependencies may need to be installed outside of PyPI. Another drawback is that PyPI and the package managersr of Linux distros do not always play nice together.
Gentoo
Since years I use Gentoo, as my Linux distro. It is very nice because it is source based and employs a rolling release upgrade scheme. It makes that you can have the latest software available, including most development tools. Source based is of course also great for an interpreted prgramming language like Python.
Packaging for Gentoo is done by means of ebuild files. The Gentoo Python Guide provides extensive instructions, even to the level how to work with packages that use setup tools. Based on a template it becomes very easy to make the ebuild filer. All that is needed is to add the description, homepage, source uri, license spec, and the dependencies. Oh and of course add an inhereit statement so that even the XDG cache gets reloaded after the installation of the icons.
Since recently Gentoo also sports a user repository called GURU. The whole ebuild can be found here.
Arch Linux
Arch has a user repository since forever, its world famous AUR. I have used Arch before, but never did any maintenance or packaging activities for it. I needed to learn all about it for this excercise. I figured that the easiest way of packaging for Arch was to not use Arch itself, but use Manjaro instead. The advantage is Manjaro is that it is super easy to install.
The AUR requires a PKGFILE, which is as simple as the Gentoo ebuild file. The PKGFILE actually reuses the logic of setuptools. What I found interesting is that for a binary distribution the AUR packages are source based. Publishing on AUR is easy, and well described here. Krapplet can now be found here on the AUR.
Debian / Ubuntu
Whereas packaging for Gentoo and Arch was a breeze, I had more trouble with Debian, and Ubuntu. My first choice was to use Debian, because it profiles itself particularly also for developers. However it took forever to install under VirtualBox. Also I did not find a user repository for Debian. Since Debian and Ubuntu share the same .deb file format, I ended up installing Lubuntu, which is quick and easy to install. The Ubuntu family of course also have their Personal Package Archive PPA, which are in a way similar to the user repositories of Gentoo and Arch. The downside is that each PPA needs to be activated individually, and therefore probabaly does not have the same marketing value as compared to Gentoo's GURU and Arch' AUR. On the flip side, the installed base of Debian, Ubuntu and all derivatives is much larger.
Packaging for Debian and Ubuntu is more complex then for Gentoo and Arch. I found the explanantions on the web not great, more in the form of examples and less instuctive. There are also more files to maintain: rules, control, copyright and changelog as a minimum. Not always easy for the casual packager to figure out.
I finally found this page for Ubuntu which had a clear recipe, that worked. I ended up with some generated files that I just needed to update a little bit.
What about other distros?
Of course I looked at RPM based distros like Fedora, and OpenSuse, but I found that Fedora did not have user repositories, and OpenSuse Tumbleweed was lacking Python3 support. Also, even though they are both RPM based, they would need separate packaging because the naming of the dependencies seemed not to be completely the same. Packaging for these two important distros therefore landed on the backburner.
Conclusion
For Python packaging setuptools is extremely important. Packaging for Gentoo and Arch was easy, Debian and Ubuntu a bit harder.
Has this helped me in getting krapplet more noticed? Not sure. If you search for krapplet on Google you'll find quite a few hits, but there is no way yet to tell if people are using krapplet already. We'll see.