Kitaab

Python Packaging sucks

dev ops nix

published 2022-03-21 22:45

updated 2022-03-21 22:45

Python is notorious for having layers and various build systems to actually build software. As someone building software first hand, this is proving annoying. Do I use setuptools? What's poetry? Yeah, I source'd my venv, and then installed through pip. Ughh. Nightmarish. As a nixOS fan, I thought surely there is a better way. Ugh, nope. Nix either uses the package manager under the hood or rebuilds everything from scratch, in general for all languages. This is normally great, because nixpkgs has 10s of 1000s of packages, and when your package exists, everything Just Works. When you're writing your own .nix file to add your package, things are bit more frisky.

Most the time you're expected to just copy what other developers of other packages did, and because most languages generally bless a particular way of packaging applications, this isn't too bad. On python, it fucking sucks. There's at least 8 different ways to package a python package module, and then 3 ways to do so in Nix for each of those package management solutions. It's really annoying.