From 3aee330151ab241ea76da9f9f93455b7aa916b78 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 4 Dec 2017 22:14:32 +0000
Subject: [PATCH 12/14] Mark sysconfigdata.py as utf-8

This is needed because we do shebang replacement.
---
 Lib/sysconfig.py                   | 1 +
 Mac/BuildScript/build-installer.py | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 6700cb6582..7c3444033f 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -347,6 +347,7 @@ def _generate_posix_vars():
     destfile = os.path.join(pybuilddir, name + '.py')
 
     with open(destfile, 'wb') as f:
+        f.write('# -*- coding: utf-8 -*-\n')
         f.write('# system configuration generated and used by'
                 ' the sysconfig module\n')
         f.write('build_time_vars = ')
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index b97d55bb03..43874910b8 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -1289,6 +1289,7 @@ def buildPython():
 
     fp = open(path, 'w')
     # duplicated from sysconfig._generate_posix_vars()
+    fp.write('# -*- coding: utf-8 -*-\n')
     fp.write('# system configuration generated and used by'
                 ' the sysconfig module\n')
     fp.write('build_time_vars = ')
-- 
2.18.0

