From 0671f83df5cfda866319dd5c8119091700861982 Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Tue, 23 May 2017 17:23:56 +0200
Subject: [PATCH] setup.py: make build_tut work with C locale

---
 setup.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index f3268a2a..964d523e 100755
--- a/setup.py
+++ b/setup.py
@@ -243,10 +243,10 @@ class build_tut(Command):
             os.mkdir(tut_dir)
         for in_fname in glob.glob('doc/source/tutorial/*.py'):
             out_fname = os.path.join(tut_dir, os.path.basename(in_fname))
-            with open(in_fname) as in_file:
-                with open(out_fname, 'w') as out_file:
+            with open(in_fname, 'rb') as in_file:
+                with open(out_fname, 'wb') as out_file:
                     for line in in_file:
-                        if not line.startswith('#HIDDEN'):
+                        if not line.startswith(b'#HIDDEN'):
                             out_file.write(line)
 
 
-- 
GitLab