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

Unified Diff: mojo/icu/generate_icu_constants.py

Issue 2010853002: Delete //mojo/icu. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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/icu/constants.h ('k') | mojo/icu/icu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/icu/generate_icu_constants.py
diff --git a/mojo/icu/generate_icu_constants.py b/mojo/icu/generate_icu_constants.py
deleted file mode 100755
index 72c320f134894ed2e20358253584295eeaf24bdb..0000000000000000000000000000000000000000
--- a/mojo/icu/generate_icu_constants.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 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 os
-import sys
-import hashlib
-
-in_file = sys.argv[1]
-out_file = sys.argv[2]
-
-out_dir = os.path.dirname(out_file)
-
-data = None
-with open(in_file, "rb") as f:
- data = f.read()
-
-if not os.path.exists(out_dir):
- os.makedirs(out_dir)
-
-sha1hash = hashlib.sha1(data).hexdigest()
-
-with open(out_file, "w") as f:
- f.write('#include "mojo/icu/constants.h"\n')
- f.write("namespace mojo {\n")
- f.write("namespace icu {\n")
- f.write("const size_t kDataSize = %s;\n" % len(data))
- f.write("const char kDataHash[] = \"%s\";\n" % sha1hash)
- f.write("\n} // namespace icu\n")
- f.write("\n} // namespace mojo\n")
« no previous file with comments | « mojo/icu/constants.h ('k') | mojo/icu/icu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698