Commits

Mikhail Korobov committed ac29b12

Fix setup.py for LC_ALL=C under Python 3.2 (see #7). Thanks @jwilk.

Comments (0)

Files changed (2)

 from distutils.core import setup
 from distutils.extension import Extension
 
+
+def read_utf8_file(path):
+    try:
+        fp = open(path, encoding='utf8')
+    except TypeError:
+        fp = open(path)
+    with fp:
+        return fp.read()
+
 setup(
     name="DAWG",
     version="0.5.1",
     description="Fast and memory efficient DAWG for Python",
-    long_description = open('README.rst').read() + open('CHANGES.rst').read(),
+    long_description = read_utf8_file('README.rst') + read_utf8_file('CHANGES.rst'),
     author='Mikhail Korobov',
     author_email='kmike84@gmail.com',
     url='https://github.com/kmike/DAWG/',
 [tox]
-envlist = py26,py27,py32,py33
+envlist = py26,py27,py32,py33,py32-locale
 
 [testenv]
 deps =
     pytest
 commands=
     py.test []
+
+[testenv:py32-locale]
+basepython = python3.2
+setenv =
+    LC_ALL=C