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

Unified Diff: third_party/cython/cp_python_binary_modules.py

Issue 578893002: mojo: Fix dependency for building python bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused variable Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/mojo.gyp ('k') | third_party/cython/cython_compiler.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/cython/cp_python_binary_modules.py
diff --git a/third_party/cython/cp_python_binary_modules.py b/third_party/cython/cp_python_binary_modules.py
deleted file mode 100644
index cd7505ba21fd582333e1779f1c3143f063b45946..0000000000000000000000000000000000000000
--- a/third_party/cython/cp_python_binary_modules.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import os
-import shutil
-import sys
-
-def touch(fname):
- if os.path.exists(fname):
- os.utime(fname, None)
- else:
- open(fname, 'a').close()
-
-def main():
- """Command line utility to copy python binary modules to the correct package
- hierarchy.
- """
- parser = argparse.ArgumentParser(
- description='Copy python binary modules to the correct package '
- 'hierarchy.')
- parser.add_argument('timestamp', help='The timetsamp file.')
- parser.add_argument('lib_dir', help='The directory containing the modules')
- parser.add_argument('destination_dir',
- help='The destination directory of the module')
- parser.add_argument('mappings', nargs='+',
- help='The mapping from module to library.')
- opts = parser.parse_args()
-
- if not os.path.exists(opts.destination_dir):
- try:
- os.makedirs(opts.destination_dir)
- except:
- # Ignore errors on directory creation.
- pass
-
- for mapping in opts.mappings:
- [module, library] = mapping.split('=')
- shutil.copy(os.path.join(opts.lib_dir, library),
- os.path.join(opts.destination_dir, module))
-
- touch(opts.timestamp)
-
-if __name__ == '__main__':
- main()
« no previous file with comments | « mojo/mojo.gyp ('k') | third_party/cython/cython_compiler.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698