[Setup] use utf-8 explicitly in setup.py

This commit is contained in:
Stefan Kögl 2014-06-30 22:42:03 +02:00
parent b14c0890df
commit 45b44b7e41
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import io
import re
import warnings
try:
@ -10,7 +11,7 @@ except ImportError:
from distutils.core import setup
has_setuptools = False
src = open('jsonpatch.py').read()
src = io.open('jsonpatch.py', encoding='utf-8').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", src))
docstrings = re.findall('"""([^"]*)"""', src, re.MULTILINE | re.DOTALL)