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

Unified Diff: third_party/cython/python_flags.py

Issue 506593002: Revert "Core mojo API for python." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/cython/python_export.h ('k') | third_party/cython/python_module.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/cython/python_flags.py
diff --git a/third_party/cython/python_flags.py b/third_party/cython/python_flags.py
deleted file mode 100644
index 03c4ad752dfc2adaa901877b088bdfcd0659db26..0000000000000000000000000000000000000000
--- a/third_party/cython/python_flags.py
+++ /dev/null
@@ -1,53 +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 sys
-
-from distutils import sysconfig
-from distutils.command import build_ext
-from distutils.dist import Distribution
-from distutils.extension import Extension
-
-def main():
- """Command line utility to retrieve compilation options for python modules'
- """
- parser = argparse.ArgumentParser(
- description='Retrieves compilation options for python modules.')
- parser.add_argument('--gn',
- help='Returns all values in a format suitable for gn',
- action='store_true')
- parser.add_argument('--libraries', help='Returns libraries',
- action='store_true')
- parser.add_argument('--includes', help='Returns includes',
- action='store_true')
- parser.add_argument('--library_dirs', help='Returns library_dirs',
- action='store_true')
- opts = parser.parse_args()
-
- ext = Extension('Dummy', [])
- b = build_ext.build_ext(Distribution())
- b.initialize_options()
- b.finalize_options()
- result = []
- if opts.libraries:
- libraries = b.get_libraries(ext)
- if sys.platform == 'darwin':
- libraries += [ '-lpython%s' % sys.version[:3] ]
- result = result + libraries
- if opts.includes:
- result = result + b.include_dirs
- if opts.library_dirs:
- if sys.platform == 'darwin':
- result.append('%s/lib' % sysconfig.get_config_vars('prefix')[0])
-
- if opts.gn:
- for x in result:
- print x
- else:
- print ''.join(['"%s"' % x for x in result])
-
-if __name__ == '__main__':
- main()
« no previous file with comments | « third_party/cython/python_export.h ('k') | third_party/cython/python_module.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698