Index: services/icu_data/embed_icu_data.py |
diff --git a/services/icu_data/embed_icu_data.py b/services/icu_data/embed_icu_data.py |
deleted file mode 100755 |
index 515a3bb767b95ee9f11f53b88573460894c24831..0000000000000000000000000000000000000000 |
--- a/services/icu_data/embed_icu_data.py |
+++ /dev/null |
@@ -1,38 +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() |
- |
-values = ["0x%02x" % ord(c) for c in data] |
-lines = [] |
-chunk_size = 16 |
-for i in range(0, len(values), chunk_size): |
- lines.append(", ".join(values[i: i + chunk_size])) |
- |
-with open(out_file, "w") as f: |
- f.write('#include "services/icu_data/data.h"\n') |
- f.write("namespace icu_data {\n") |
- f.write("const char kICUDataTable[%d] = {\n" % len(data)) |
- f.write(",\n".join(lines)) |
- f.write("\n};\n") |
- f.write("const size_t kICUDataTableSize = sizeof(kICUDataTable);\n") |
- f.write("const char kICUDataTableHash[] = \"%s\";\n" % sha1hash) |
- f.write("}\n") |