The same thing happens with generated Makefiles. They contain DOS/NT commands even if generated from MSYS environment. Why isn't it possible to use distutils/setuptools or scons instead of reinventing the process?