Fri, 05 Jan 2007

distutils is no good for distributing applications

I've been trying to use distutils to create an installation framework for a little Gnome applet written in Python that I've been working on. After struggling with it for a few hours I've decided that it's really not going to do what I want.

The main problem I have is that I need to substitute parts of some files with the final installation paths for various data files. distutils doesn't provide such a capability and bolting it on yourself in a reliable way is rather difficult. I've tried all sorts of ways of extending the distutils core but everything I come up with is fragile, breaking if the user specifies a custom --prefix. It seems that I'm not alone.

I suppose I'm pushing the boundaries of distutils a little too far. Its really intended to distribute Python modules not Python applications. Still, modules that require external data files (outside of site-packages) would run in to similar problems.

I may have to learn how to use autotools or perhaps just roll my own scripts and Makefile. I'd love to know if there's some other alternatives.

Tags:
posted at: 20:27 | permalink | comments