1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
3 Date: Sat, 25 Jun 2022 20:41:40 +0000
4 Subject: [PATCH] gyp-fix-cmake
6 (From Fedora, with fixed exception type)
8 pylib/gyp/generator/cmake.py | 8 ++++----
9 1 file changed, 4 insertions(+), 4 deletions(-)
11 diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
12 index 4a2041cf2687..12461dc1d48b 100644
13 --- a/pylib/gyp/generator/cmake.py
14 +++ b/pylib/gyp/generator/cmake.py
15 @@ -40,9 +40,9 @@ import gyp.xcode_emulation
18 # maketrans moved to str in python3.
19 - _maketrans = string.maketrans
21 _maketrans = str.maketrans
22 +except AttributeError:
23 + _maketrans = string.maketrans
25 generator_default_variables = {
26 'EXECUTABLE_PREFIX': '',
27 @@ -281,7 +281,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps,
28 dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
30 if int(action.get('process_outputs_as_sources', False)):
31 - extra_sources.extend(zip(cmake_outputs, outputs))
32 + extra_sources.extend(list(zip(cmake_outputs, outputs)))
35 output.write('add_custom_command(OUTPUT ')
36 @@ -987,7 +987,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
39 xcode_settings = config.get('xcode_settings', {})
40 - for xcode_setting, xcode_value in xcode_settings.viewitems():
41 + for xcode_setting, xcode_value in xcode_settings.items():
42 SetTargetProperty(output, cmake_target_name,
43 "XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
44 '' if isinstance(xcode_value, str) else ' ')