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

Unified Diff: tools/telemetry/third_party/modulegraph/scripts/extract_implies.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: tools/telemetry/third_party/modulegraph/scripts/extract_implies.py
diff --git a/tools/telemetry/third_party/modulegraph/scripts/extract_implies.py b/tools/telemetry/third_party/modulegraph/scripts/extract_implies.py
deleted file mode 100644
index d6ab353614197508f8dbb52dd8ffbd3a075d2b9f..0000000000000000000000000000000000000000
--- a/tools/telemetry/third_party/modulegraph/scripts/extract_implies.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-"""
-This script looks for ImportModules calls in C extensions
-of the stdlib.
-
-The current version has harcoded the location of the source
-tries on Ronald's machine, a future version will be able
-to rebuild the modulegraph source file that contains
-this information.
-"""
-
-import re
-import sys
-import os
-import pprint
-
-import_re = re.compile('PyImport_ImportModule\w+\("(\w+)"\);')
-
-def extract_implies(root):
- modules_dir = os.path.join(root, "Modules")
- for fn in os.listdir(modules_dir):
- if not fn.endswith('.c'):
- continue
-
- module_name = fn[:-2]
- if module_name.endswith('module'):
- module_name = module_name[:-6]
-
- with open(os.path.join(modules_dir, fn)) as fp:
- data = fp.read()
-
- imports = list(sorted(set(import_re.findall(data))))
- if imports:
- yield module_name, imports
-
-
-
-def main():
- for version in ('2.6', '2.7', '3.1'):
- print "====", version
- pprint.pprint(list(extract_implies('/Users/ronald/Projects/python/release%s-maint'%(version.replace('.', '')))))
-
-if __name__ == "__main__":
- main()

Powered by Google App Engine
This is Rietveld 408576698