diff --git a/.gitignore b/.gitignore index 99768ea..98fd4aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ __pycache__ .ropeproject *.pyc -progressbar33.egg-info \ No newline at end of file +progressbar33.egg-info +build/ +dist/ \ No newline at end of file diff --git a/setup.py b/setup.py index fed6929..e421c7e 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,15 @@ import os from setuptools import setup, find_packages import progressbar +import codecs + +# From: https://mail.python.org/pipermail/python-list/2012-February/620318.html +try: + codecs.lookup('mbcs') +except LookupError: + ascii = codecs.lookup('ascii') + func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs') + codecs.register(func) # TODO: I don't believe this should be in here. This should be done on package # creation only