Skip to content

Commit f88a116

Browse files
Justin CohenCrashpad LUCI CQ
Justin Cohen
authored and
Crashpad LUCI CQ
committedMar 24, 2022
Update Crashpad scripts to python3
Also update mini_chromium to f87a38442a9e for python3 changes. Change-Id: I4ca7aa4cc9dcc97698fc0bc13cfb339421668074 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3542572 Reviewed-by: Mark Mentovai <[email protected]> Commit-Queue: Justin Cohen <[email protected]>
1 parent 25e67e2 commit f88a116

File tree

9 files changed

+15
-24
lines changed

9 files changed

+15
-24
lines changed
 

‎.gn

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
# limitations under the License.
1414

1515
buildconfig = "//build/BUILDCONFIG.gn"
16+
script_executable = "python3"

‎DEPS

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ deps = {
3939
'e1e7b0ad8ee99a875b272c8e33e308472e897660',
4040
'crashpad/third_party/mini_chromium/mini_chromium':
4141
Var('chromium_git') + '/chromium/mini_chromium@' +
42-
'6e2f204b4ae135c40a6c4b3c3a01f48a86c5e886',
42+
'f87a38442a9e7ba88d1c4f479e9167927eae84ed',
4343
'crashpad/third_party/libfuzzer/src':
4444
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
4545
'fda403cf93ecb8792cb1d061564d89a6553ca020',
@@ -169,7 +169,7 @@ hooks = [
169169
'pattern': '.',
170170
'condition': 'run_setup_ios_gn and checkout_ios',
171171
'action': [
172-
'python',
172+
'python3',
173173
'crashpad/build/ios/setup_ios_gn.py'
174174
],
175175
},

‎build/ios/convert_gn_xcodeproj.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright 2020 The Crashpad Authors. All rights reserved.
44
#

‎build/ios/setup_ios_gn.py

+6-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright 2020 The Crashpad Authors. All rights reserved.
44
#
@@ -23,29 +23,20 @@
2323
import subprocess
2424
import sys
2525
import tempfile
26-
27-
try:
28-
import configparser
29-
except ImportError:
30-
import ConfigParser as configparser
31-
32-
try:
33-
import StringIO as io
34-
except ImportError:
35-
import io
26+
import configparser
27+
import io
3628

3729
SUPPORTED_TARGETS = ('iphoneos', 'iphonesimulator')
3830
SUPPORTED_CONFIGS = ('Debug', 'Release', 'Profile', 'Official', 'Coverage')
3931

4032

41-
class ConfigParserWithStringInterpolation(configparser.SafeConfigParser):
33+
class ConfigParserWithStringInterpolation(configparser.ConfigParser):
4234
'''A .ini file parser that supports strings and environment variables.'''
4335

4436
ENV_VAR_PATTERN = re.compile(r'\$([A-Za-z0-9_]+)')
4537

4638
def values(self, section):
47-
return map(lambda kv: self._UnquoteString(self._ExpandEnvVar(kv[1])),
48-
configparser.ConfigParser.items(self, section))
39+
return [self._UnquoteString(self._ExpandEnvVar(kv[1])) for kv in configparser.ConfigParser.items(self, section)]
4940

5041
def getstring(self, section, option):
5142
return self._UnquoteString(self._ExpandEnvVar(self.get(section,
@@ -110,7 +101,7 @@ def _GetGnArgs(self):
110101
args.append(('target_cpu', target_cpu))
111102
args.append(
112103
('additional_target_cpus',
113-
[cpu for cpu in cpu_values.itervalues() if cpu != target_cpu]))
104+
[cpu for cpu in cpu_values.values() if cpu != target_cpu]))
114105
else:
115106
args.append(('target_cpu', cpu_values[build_arch]))
116107

‎doc/support/generate_doxygen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright 2017 The Crashpad Authors. All rights reserved.
44
#

‎snapshot/win/end_to_end_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright 2015 The Crashpad Authors. All rights reserved.
44
#

‎util/mach/mig.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright 2019 The Crashpad Authors. All rights reserved.
44
#

‎util/mach/mig_fix.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env python
2-
# coding: utf-8
1+
#!/usr/bin/env python3
32

43
# Copyright 2019 The Crashpad Authors. All rights reserved.
54
#

‎util/mach/mig_gen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright 2019 The Crashpad Authors. All rights reserved.
44
#

0 commit comments

Comments
 (0)
Please sign in to comment.