From 829de940d1a219661328f6d00cc34a434dc7ce7e Mon Sep 17 00:00:00 2001 From: Juan Sanchez Date: Sat, 23 Sep 2023 08:51:11 -0500 Subject: [PATCH] Fix for upstream issues with compiler path (#866) * fix for Issue #860 * update docstring and implementation to #866 --- kivy_ios/toolchain.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/kivy_ios/toolchain.py b/kivy_ios/toolchain.py index 471755e2..0633e531 100755 --- a/kivy_ios/toolchain.py +++ b/kivy_ios/toolchain.py @@ -209,8 +209,18 @@ def get_env(self): 'include_file_mtime,include_file_ctime,file_stat_matches')) if not self._ccsh: - self._ccsh = tempfile.NamedTemporaryFile() - self._cxxsh = tempfile.NamedTemporaryFile() + def noicctempfile(): + ''' + reported issue where C Python has issues with 'icc' in the compiler path + https://github.com/python/cpython/issues/96398 + https://github.com/python/cpython/pull/96399 + ''' + while 'icc' in (x := tempfile.NamedTemporaryFile()).name: + pass + return x + + self._ccsh = noicctempfile() + self._cxxsh = noicctempfile() sh.chmod("+x", self._ccsh.name) sh.chmod("+x", self._cxxsh.name) self._ccsh.write(b'#!/bin/sh\n')