JP van Oosten

Python distutils woes

Oct 21, 2009

Today I was working on a setup script for submin, but I got some unexpected results while testing. Apparently, I had messed up a path by using string concatenation (pro-tip: always use os.path.join).

Every time I tried something else, the same faulty paths were copied to the install directory. How did I fix it? By removing the build/ directory.

So, if you have weird problems with distutils, try removing the build/ directory. This directory contains the files which are copied to the final installation directory, and is not cleaned up properly after finishing the install command.