Coding 2020-02-28

By Max Woerner Chase

One of the long-standing problems developing Python projects has been the packaging libraries. The default libraries are extremely flexible, but give users the ability to define nonsensical behavior, or omit vital data from the final package.

With PEP 517, the situation changed. Now, there's a standard to write packaging tools against, that gives them the ability to define packages in a declarative manner. Various packaging alternatives have been developed, but I'm going to focus on just a few: Poetry, flit, and enscons. The first two focus on making it easy to develop simple projects, each taking a somewhat different approach, while enscons should allow for more complicated means of building, which is necessary for some of my projects.

I'm most familiar with Poetry, because it was the first setuptools alternative I know of to support the src layout. As such, that's what I used for a while. However, in some ways it wasn't a good fit. It has a number of features I ignored or worked against, such as managing virtual environments, and making editable installs of the project next to the dev dependencies, and some operations are extremely slow. Part of my goal these next few days is to determine how much of the performance issues I ran across in Poetry several months ago are still a problem, and how specific they are to Poetry.

My ultimate goal is to migrate most of my projects from Poetry to flit, and Dennis to enscons (and later to flit), but first I want to do some basic comparisons of the three tools.

My basic plan is to make three separate projects the way I'd like to lay things out with each tool, and give them dependencies that pull a lot of stuff in. Then, for each one, time pip install . and the tool's build command, followed by pip installing the wheel.

After going through the basics with the tools, I've come to the following conclusions:

I appreciate that enscons is there when I need it, but I hope to not need it much. (Also, I'm assuming I can make it work with Coconut, but I'm hoping that's a fair assumption.)

Good night.