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

Side by Side Diff: third_party/cython/cp_python_binary_modules.py

Issue 377293002: Core mojo API for python. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to fix timing unit tests Created 6 years, 4 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
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
pkl (ping after 24h if needed) 2014/08/21 09:32:48 Please add docstring. This looks like something th
qsr 2014/08/21 12:10:05 Done.
5 import os
6 import shutil
7 import sys
8
9 def touch(fname):
10 if os.path.exists(fname):
11 os.utime(fname, None)
12 else:
13 open(fname, 'a').close()
14
15 def main():
16 assert len(sys.argv) >= 4
17 timestamp = sys.argv[1]
18 lib_dir = sys.argv[2]
19 destination_dir = sys.argv[3]
20 mappings = sys.argv[4:]
21
22 if not os.path.exists(destination_dir):
23 os.makedirs(destination_dir)
24
25 for mapping in mappings:
26 [module, library] = mapping.split('=')
27 shutil.copy(os.path.join(lib_dir, library),
28 os.path.join(destination_dir, module))
29
30 touch(timestamp)
31
32 if __name__ == '__main__':
33 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698