From 5c7006c9de4029afc508e2c43d78de12a0d19cfe Mon Sep 17 00:00:00 2001 From: "Vitaly Cheptsov via Groups.Io" Date: Sun, 20 Oct 2019 18:26:18 +0800 Subject: [PATCH] BaseTools: Do not call sys.setdefaultencoding with python 3 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2301 This interface was a originally a no-op in python 3, and now is fully removed causing a build warning on macOS (Darwin). Signed-off-by: Vitaly Cheptsov > Acked-by: Bob Feng --- BaseTools/Source/Python/sitecustomize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/sitecustomize.py b/BaseTools/Source/Python/sitecustomize.py index 7dbbf8a232..50783e1b3a 100644 --- a/BaseTools/Source/Python/sitecustomize.py +++ b/BaseTools/Source/Python/sitecustomize.py @@ -7,7 +7,7 @@ import sys import locale -if sys.platform == "darwin": +if sys.platform == "darwin" and sys.version_info[0] < 3: DefaultLocal = locale.getdefaultlocale()[1] if DefaultLocal is None: DefaultLocal = 'UTF8'