This causes a problem when compiling the bases for cx_Freeze. You see a whole load of warnings like this:
/home/thomas/Code/cx_freeze/source/bases/Console.c:36: undefined reference to `PyErr_Print'
I can get it to work by modifying this line to
if True: so that it always links against libpython. I'm not sure if that's right, though -
cx_Freeze.util can be compiled without explicitly linking to python, but maybe the rules are different for executables.