summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Rouse <jr@its.to>2021-01-28 00:29:20 -0800
committerGitHub <noreply@github.com>2021-01-28 00:29:20 -0800
commit8eacfa312d77aba28d483fbfb6f6fc54099622be (patch)
tree0c853b8e702e36e19eeb432074e35eb7a0e046f2
parentc5c478e05d8fc36bac09af7db3888680535e2dfb (diff)
parent381d90dd40abf2e46200855c5bb248f0d68b147c (diff)
downloadappdirs-8eacfa312d77aba28d483fbfb6f6fc54099622be.tar.gz
Merge pull request #152 from neirbowj/explicit_encoding
Explicitly decode appdirs.py as UTF-8
-rw-r--r--setup.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index c0ebe1b..f99fdbf 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from io import open
import os
# appdirs is a dependency of setuptools, so allow installing without it.
try:
@@ -9,7 +10,7 @@ import ast
def read(fname):
- inf = open(os.path.join(os.path.dirname(__file__), fname))
+ inf = open(os.path.join(os.path.dirname(__file__), fname), encoding='utf8')
out = "\n" + inf.read().replace("\r\n", "\n")
inf.close()
return out