Skip to content

Commit a8f3416

Browse files
committed
fixup! gyp: sync code base with nodejs repo
1 parent 546c1df commit a8f3416

File tree

5 files changed

+5
-16
lines changed

5 files changed

+5
-16
lines changed

gyp/pylib/gyp/common.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -434,19 +434,15 @@ def GetFlavor(params):
434434
return flavors[sys.platform]
435435
if sys.platform.startswith('sunos'):
436436
return 'solaris'
437-
if sys.platform.startswith('freebsd'):
438-
return 'freebsd'
439-
if sys.platform.startswith('dragonfly'):
437+
if sys.platform.startswith(('dragonfly', 'freebsd')):
440438
return 'freebsd'
441439
if sys.platform.startswith('openbsd'):
442440
return 'openbsd'
443441
if sys.platform.startswith('netbsd'):
444442
return 'netbsd'
445443
if sys.platform.startswith('aix'):
446444
return 'aix'
447-
if sys.platform.startswith('zos'):
448-
return 'zos'
449-
if sys.platform.startswith('os390'):
445+
if sys.platform.startswith(('os390', 'zos')):
450446
return 'zos'
451447

452448
return 'linux'

gyp/pylib/gyp/generator/make.py

-7
Original file line numberDiff line numberDiff line change
@@ -1949,13 +1949,6 @@ def ExpandInputRoot(self, template, expansion, dirname):
19491949

19501950
def _InstallableTargetInstallPath(self):
19511951
"""Returns the location of the final output for an installable target."""
1952-
# Xcode puts shared_library results into PRODUCT_DIR, and some gyp files
1953-
# rely on this. Emulate this behavior for mac.
1954-
if (self.type == 'shared_library' and
1955-
(self.flavor != 'mac' or self.toolset != 'target')):
1956-
# Install all shared libs into a common directory (per toolset) for
1957-
# convenient access with LD_LIBRARY_PATH.
1958-
return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias)
19591952
return '$(builddir)/' + self.alias
19601953

19611954

gyp/pylib/gyp/generator/ninja.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def WriteSpec(self, spec, config_name, generator_flags):
490490
if self.flavor != 'mac' or len(self.archs) == 1:
491491
link_deps += [self.GypPathToNinja(o) for o in obj_outputs]
492492
else:
493-
print("Warning: Actions/rules writing object files don't work with " \
493+
print("Warning: Actions/rules writing object files don't work with "
494494
"multiarch targets, dropping. (target %s)" % spec['target_name'])
495495
elif self.flavor == 'mac' and len(self.archs) > 1:
496496
link_deps = collections.defaultdict(list)

gyp/pylib/gyp/input.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ def MakePathRelative(to_file, fro_file, item):
20472047
gyp.common.RelativePath(os.path.dirname(fro_file),
20482048
os.path.dirname(to_file)),
20492049
item)).replace('\\', '/')
2050-
if item[-1:] == '/':
2050+
if item.endswith('/'):
20512051
ret += '/'
20522052
return ret
20532053

gyp/pylib/gyp/xcode_emulation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _ConvertConditionalKeys(self, configname):
201201
new_key = key.split("[")[0]
202202
settings[new_key] = settings[key]
203203
else:
204-
print('Warning: Conditional keys not implemented, ignoring:', \
204+
print('Warning: Conditional keys not implemented, ignoring:',
205205
' '.join(conditional_keys))
206206
del settings[key]
207207

0 commit comments

Comments
 (0)