gyp: remove semicolons (Python != JavaScript)
PR-URL: https://github.com/nodejs/node/pull/29228 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
This commit is contained in:
parent
6c5ca74c93
commit
6726f567d7
@ -59,10 +59,10 @@ class TestGetFlavor(unittest.TestCase):
|
|||||||
self.assertFlavor('freebsd', 'freebsd9' , {})
|
self.assertFlavor('freebsd', 'freebsd9' , {})
|
||||||
self.assertFlavor('freebsd', 'freebsd10', {})
|
self.assertFlavor('freebsd', 'freebsd10', {})
|
||||||
self.assertFlavor('openbsd', 'openbsd5' , {})
|
self.assertFlavor('openbsd', 'openbsd5' , {})
|
||||||
self.assertFlavor('solaris', 'sunos5' , {});
|
self.assertFlavor('solaris', 'sunos5' , {})
|
||||||
self.assertFlavor('solaris', 'sunos' , {});
|
self.assertFlavor('solaris', 'sunos' , {})
|
||||||
self.assertFlavor('linux' , 'linux2' , {});
|
self.assertFlavor('linux' , 'linux2' , {})
|
||||||
self.assertFlavor('linux' , 'linux3' , {});
|
self.assertFlavor('linux' , 'linux3' , {})
|
||||||
|
|
||||||
def test_param(self):
|
def test_param(self):
|
||||||
self.assertFlavor('foobar', 'linux2' , {'flavor': 'foobar'})
|
self.assertFlavor('foobar', 'linux2' , {'flavor': 'foobar'})
|
||||||
|
@ -615,7 +615,7 @@ class TargetCalculator(object):
|
|||||||
|
|
||||||
def _supplied_target_names_no_all(self):
|
def _supplied_target_names_no_all(self):
|
||||||
"""Returns the supplied test targets without 'all'."""
|
"""Returns the supplied test targets without 'all'."""
|
||||||
result = self._supplied_target_names();
|
result = self._supplied_target_names()
|
||||||
result.discard('all')
|
result.discard('all')
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@ -668,7 +668,7 @@ class TargetCalculator(object):
|
|||||||
|
|
||||||
def find_matching_compile_target_names(self):
|
def find_matching_compile_target_names(self):
|
||||||
"""Returns the set of output compile targets."""
|
"""Returns the set of output compile targets."""
|
||||||
assert self.is_build_impacted();
|
assert self.is_build_impacted()
|
||||||
# Compile targets are found by searching up from changed targets.
|
# Compile targets are found by searching up from changed targets.
|
||||||
# Reset the visited status for _GetBuildTargets.
|
# Reset the visited status for _GetBuildTargets.
|
||||||
for target in self._name_to_target.itervalues():
|
for target in self._name_to_target.itervalues():
|
||||||
|
@ -686,7 +686,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
|
|||||||
for src in srcs:
|
for src in srcs:
|
||||||
_, ext = os.path.splitext(src)
|
_, ext = os.path.splitext(src)
|
||||||
src_type = COMPILABLE_EXTENSIONS.get(ext, None)
|
src_type = COMPILABLE_EXTENSIONS.get(ext, None)
|
||||||
src_norm_path = NormjoinPath(path_from_cmakelists_to_gyp, src);
|
src_norm_path = NormjoinPath(path_from_cmakelists_to_gyp, src)
|
||||||
|
|
||||||
if src_type == 's':
|
if src_type == 's':
|
||||||
s_sources.append(src_norm_path)
|
s_sources.append(src_norm_path)
|
||||||
|
@ -248,7 +248,7 @@ class XcodeProject(object):
|
|||||||
targets_for_all.append(xcode_target)
|
targets_for_all.append(xcode_target)
|
||||||
|
|
||||||
if target_name.lower() == 'all':
|
if target_name.lower() == 'all':
|
||||||
has_custom_all = True;
|
has_custom_all = True
|
||||||
|
|
||||||
# If this target has a 'run_as' attribute, add its target to the
|
# If this target has a 'run_as' attribute, add its target to the
|
||||||
# targets, and add it to the test targets.
|
# targets, and add it to the test targets.
|
||||||
@ -639,7 +639,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
|||||||
pbxp = xcp.project
|
pbxp = xcp.project
|
||||||
|
|
||||||
# Set project-level attributes from multiple options
|
# Set project-level attributes from multiple options
|
||||||
project_attributes = {};
|
project_attributes = {}
|
||||||
if parallel_builds:
|
if parallel_builds:
|
||||||
project_attributes['BuildIndependentTargetsInParallel'] = 'YES'
|
project_attributes['BuildIndependentTargetsInParallel'] = 'YES'
|
||||||
if upgrade_check_project_version:
|
if upgrade_check_project_version:
|
||||||
@ -788,7 +788,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
|||||||
# logic all happens in ninja. Don't bother creating the extra targets in
|
# logic all happens in ninja. Don't bother creating the extra targets in
|
||||||
# that case.
|
# that case.
|
||||||
if type != 'none' and (spec_actions or spec_rules) and not ninja_wrapper:
|
if type != 'none' and (spec_actions or spec_rules) and not ninja_wrapper:
|
||||||
support_xccl = CreateXCConfigurationList(configuration_names);
|
support_xccl = CreateXCConfigurationList(configuration_names)
|
||||||
support_target_suffix = generator_flags.get(
|
support_target_suffix = generator_flags.get(
|
||||||
'support_target_suffix', ' Support')
|
'support_target_suffix', ' Support')
|
||||||
support_target_properties = {
|
support_target_properties = {
|
||||||
@ -1183,7 +1183,7 @@ exit 1
|
|||||||
dest = '$(SRCROOT)/' + dest
|
dest = '$(SRCROOT)/' + dest
|
||||||
|
|
||||||
code_sign = int(copy_group.get('xcode_code_sign', 0))
|
code_sign = int(copy_group.get('xcode_code_sign', 0))
|
||||||
settings = (None, '{ATTRIBUTES = (CodeSignOnCopy, ); }')[code_sign];
|
settings = (None, '{ATTRIBUTES = (CodeSignOnCopy, ); }')[code_sign]
|
||||||
|
|
||||||
# Coalesce multiple "copies" sections in the same target with the same
|
# Coalesce multiple "copies" sections in the same target with the same
|
||||||
# "destination" property into the same PBXCopyFilesBuildPhase, otherwise
|
# "destination" property into the same PBXCopyFilesBuildPhase, otherwise
|
||||||
|
@ -285,7 +285,7 @@ class MacTool(object):
|
|||||||
def ExecPackageIosFramework(self, framework):
|
def ExecPackageIosFramework(self, framework):
|
||||||
# Find the name of the binary based on the part before the ".framework".
|
# Find the name of the binary based on the part before the ".framework".
|
||||||
binary = os.path.basename(framework).split('.')[0]
|
binary = os.path.basename(framework).split('.')[0]
|
||||||
module_path = os.path.join(framework, 'Modules');
|
module_path = os.path.join(framework, 'Modules')
|
||||||
if not os.path.exists(module_path):
|
if not os.path.exists(module_path):
|
||||||
os.mkdir(module_path)
|
os.mkdir(module_path)
|
||||||
module_template = 'framework module %s {\n' \
|
module_template = 'framework module %s {\n' \
|
||||||
@ -346,7 +346,7 @@ class MacTool(object):
|
|||||||
WriteHmap(out, filelist)
|
WriteHmap(out, filelist)
|
||||||
|
|
||||||
def ExecCopyIosFrameworkHeaders(self, framework, *copy_headers):
|
def ExecCopyIosFrameworkHeaders(self, framework, *copy_headers):
|
||||||
header_path = os.path.join(framework, 'Headers');
|
header_path = os.path.join(framework, 'Headers')
|
||||||
if not os.path.exists(header_path):
|
if not os.path.exists(header_path):
|
||||||
os.makedirs(header_path)
|
os.makedirs(header_path)
|
||||||
for header in copy_headers:
|
for header in copy_headers:
|
||||||
|
@ -1076,7 +1076,7 @@ class XcodeSettings(object):
|
|||||||
# Xcode expects XCTests to be copied into the TEST_HOST dir.
|
# Xcode expects XCTests to be copied into the TEST_HOST dir.
|
||||||
if self._IsXCTest():
|
if self._IsXCTest():
|
||||||
source = os.path.join("${BUILT_PRODUCTS_DIR}", product_name)
|
source = os.path.join("${BUILT_PRODUCTS_DIR}", product_name)
|
||||||
test_host = os.path.dirname(settings.get('TEST_HOST'));
|
test_host = os.path.dirname(settings.get('TEST_HOST'))
|
||||||
xctest_destination = os.path.join(test_host, 'PlugIns', product_name)
|
xctest_destination = os.path.join(test_host, 'PlugIns', product_name)
|
||||||
postbuilds.extend(['ditto %s %s' % (source, xctest_destination)])
|
postbuilds.extend(['ditto %s %s' % (source, xctest_destination)])
|
||||||
|
|
||||||
@ -1093,7 +1093,7 @@ class XcodeSettings(object):
|
|||||||
|
|
||||||
if self._IsXCTest():
|
if self._IsXCTest():
|
||||||
# For device xctests, Xcode copies two extra frameworks into $TEST_HOST.
|
# For device xctests, Xcode copies two extra frameworks into $TEST_HOST.
|
||||||
test_host = os.path.dirname(settings.get('TEST_HOST'));
|
test_host = os.path.dirname(settings.get('TEST_HOST'))
|
||||||
frameworks_dir = os.path.join(test_host, 'Frameworks')
|
frameworks_dir = os.path.join(test_host, 'Frameworks')
|
||||||
platform_root = self._XcodePlatformPath(configname)
|
platform_root = self._XcodePlatformPath(configname)
|
||||||
frameworks = \
|
frameworks = \
|
||||||
|
@ -1994,7 +1994,7 @@ class PBXCopyFilesBuildPhase(XCBuildPhase):
|
|||||||
|
|
||||||
path_tree_match = self.path_tree_re.search(path)
|
path_tree_match = self.path_tree_re.search(path)
|
||||||
if path_tree_match:
|
if path_tree_match:
|
||||||
path_tree = path_tree_match.group(1);
|
path_tree = path_tree_match.group(1)
|
||||||
if path_tree in self.path_tree_first_to_subfolder:
|
if path_tree in self.path_tree_first_to_subfolder:
|
||||||
subfolder = self.path_tree_first_to_subfolder[path_tree]
|
subfolder = self.path_tree_first_to_subfolder[path_tree]
|
||||||
relative_path = path_tree_match.group(3)
|
relative_path = path_tree_match.group(3)
|
||||||
@ -2047,7 +2047,7 @@ class PBXCopyFilesBuildPhase(XCBuildPhase):
|
|||||||
# subfolder = 16 from above
|
# subfolder = 16 from above
|
||||||
# The second element of the path is an unrecognized variable.
|
# The second element of the path is an unrecognized variable.
|
||||||
# Include it and any remaining elements in relative_path.
|
# Include it and any remaining elements in relative_path.
|
||||||
relative_path = path_tree_match.group(3);
|
relative_path = path_tree_match.group(3)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# The path starts with an unrecognized Xcode variable
|
# The path starts with an unrecognized Xcode variable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user