From 790549fd25eb50ceed852ce3436e3afc111bbf37 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Sun, 26 Jun 2016 07:13:16 -0500 Subject: [PATCH] Open our README appropriately Systems without a LOCALE present will not be able to read our file appropriately on Python 3. This was causing our Python 3 CI jobs on GitLab to fail. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f6eac78..2624db4 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from __future__ import with_statement import functools +import io import os import sys @@ -49,7 +50,7 @@ def get_long_description(): """Generate a long description from the README and CHANGES files.""" descr = [] for fname in ('README.rst',): - with open(fname) as f: + with io.open(fname, encoding='utf-8') as f: descr.append(f.read()) return '\n\n'.join(descr)