From 77de5fb2d02551eb7563ba1a42c74ad6581815fb Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 2 Jan 2019 15:52:08 +0100 Subject: setup.py: Fix running under non-UTF8 locale Redirecting stderr to stdout causes an error when running under non-UTF8 locales. For the build scripts, it is also not desired to mix the output channels, so, remove the redirection. Change-Id: I6e3d05ede00537c3cc4c022780e8d0ed27bb0cad Fixes: PYSIDE-880 Reviewed-by: Alexandru Croitor --- coin_build_instructions.py | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'coin_build_instructions.py') diff --git a/coin_build_instructions.py b/coin_build_instructions.py index 969b9272b..db021470f 100644 --- a/coin_build_instructions.py +++ b/coin_build_instructions.py @@ -122,21 +122,6 @@ def call_setup(python_ver): cmd += ["--package-timestamp=" + CI_INTEGRATION_ID] env = os.environ - if CI_HOST_OS == "MacOS": - # On Python 3, setuptools.dist.handle_display_options does some - # weird sys.stdout.detach-ing if the stdout encoding is - # different from utf-8. This causes issues when running - # subprocess.call() because that access the original stdout - # object stored in sys.__stdout__ which was detached, and - # results in an exception being thrown. - # The Coin macOS locale by default is US-ASCII, and that - # triggers the above issue. Set the encoding to UTF-8 which - # makes sure to skip over the detach-ing code. - # Relevant links to the issue: - # https://bugs.python.org/issue15216 - # https://bitbucket.org/tarek/distribute/issues/334/fix-for-311-breaks-packages-that-use - # https://github.com/pypa/virtualenv/issues/359 - env['LC_CTYPE'] = 'UTF-8' run_instruction(cmd, "Failed to run setup.py", initial_env=env) def run_build_instructions(): -- cgit v1.2.3