Home > debian, Interesting, python > Building and Packaging a Python command-line tool for Debian

Building and Packaging a Python command-line tool for Debian

Python packaging has a chequered past.

Distutils was and still is the original tool included with the standard library. But then setuptools was created to overcome the limitations of distutils, gained wide adoption, subsequently stagnated, and a fork called distribute was created to address some of the issues. Distutils2 was an attempt to take the best of previous tools to support Python 3, but it failed. Then distribute grew to support Python 3, was merged back in to setuptools, and everything else became moot!

Unfortunately, it’s hard to find reliable information on python packaging, because many articles you might find in a Duckduckgo search were created before setuptools was reinvigorated. Many reflect practices that are sub-optimal today, and I would disregard anything written before the distribute merge, which happened in March 2013.

While which packaging tool to use was ambiguous in the past, it’s now much easier to recommend one. At the time of writing (September 2016), you should use setuptools. It’s what most packages use, is fully supported by pypi and pip, and works pretty well. For a summary of the subject of python packaging tools, this page summarises them all very well. For an authoritative reference, see packaging.python.org.

https://blog.al4.co.nz/2016/09/building-packaging-python-command-line-tool-debian/

Advertisements
Categories: debian, Interesting, python
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: