Distutils is not fully aware of unicode. Something to try: open your files like you do and get their contents as unicode, but encode the result to UTF-8 bytes before passing it to the setup function. I thinks this is worth reporting to bugs.python.org, if it isn’t already. Regards