Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: pylib/gyp/common.py

Issue 10079030: Support for freebsd 9 (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from __future__ import with_statement 5 from __future__ import with_statement
6 6
7 import errno 7 import errno
8 import filecmp 8 import filecmp
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 def GetFlavor(params): 349 def GetFlavor(params):
350 """Returns |params.flavor| if it's set, the system's default flavor else.""" 350 """Returns |params.flavor| if it's set, the system's default flavor else."""
351 flavors = { 351 flavors = {
352 'cygwin': 'win', 352 'cygwin': 'win',
353 'win32': 'win', 353 'win32': 'win',
354 'darwin': 'mac', 354 'darwin': 'mac',
355 'sunos5': 'solaris', 355 'sunos5': 'solaris',
356 'freebsd7': 'freebsd', 356 'freebsd7': 'freebsd',
357 'freebsd8': 'freebsd', 357 'freebsd8': 'freebsd',
358 'freebsd9': 'freebsd',
358 } 359 }
359 flavor = flavors.get(sys.platform, 'linux') 360 flavor = flavors.get(sys.platform, 'linux')
360 return params.get('flavor', flavor) 361 return params.get('flavor', flavor)
361 362
362 363
363 def CopyTool(flavor, out_path): 364 def CopyTool(flavor, out_path):
364 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it 365 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it
365 to |out_path|.""" 366 to |out_path|."""
366 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) 367 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None)
367 if not prefix: 368 if not prefix:
(...skipping 25 matching lines...) Expand all
393 if idfun is None: 394 if idfun is None:
394 def idfun(x): return x 395 def idfun(x): return x
395 seen = {} 396 seen = {}
396 result = [] 397 result = []
397 for item in seq: 398 for item in seq:
398 marker = idfun(item) 399 marker = idfun(item)
399 if marker in seen: continue 400 if marker in seen: continue
400 seen[marker] = 1 401 seen[marker] = 1
401 result.append(item) 402 result.append(item)
402 return result 403 return result
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698