| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8ea5ffc commit e16964e
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -97,7 +97,7 @@ new Intl.DateTimeFormat('es', { month: 'long' }).format(new Date(9E8)); | |||
| 97 | 97 | ||
| 98 | 98 | …Should return `enero` not `January`. | |
| 99 | 99 | ||
| 100 | - * Now, copy `deps/icu` over to `deps/icu-small` | ||
| 100 | + * Now, run the shrink tool to update `deps/icu-small` from `deps/icu` | ||
| 101 | 101 | ||
| 102 | 102 | > :warning: Do not modify any source code in `deps/icu-small` ! | |
| 103 | 103 | > See section below about floating patches to ICU. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,7 +63,7 @@ def checkHash(targetfile, hashAlgo): | |||
| 63 | 63 | digest = hashlib.new(hashAlgo) | |
| 64 | 64 | with open(targetfile, 'rb') as f: | |
| 65 | 65 | chunk = f.read(1024) | |
| 66 | - while chunk != "": | ||
| 66 | + while len(chunk) > 0: | ||
| 67 | 67 | digest.update(chunk) | |
| 68 | 68 | chunk = f.read(1024) | |
| 69 | 69 | return digest.hexdigest() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -128,14 +128,12 @@ def icu_info(icu_full_path): | |||
| 128 | 128 | readme_name = os.path.join(options.icudst, "README-FULL-ICU.txt" ) | |
| 129 | 129 | ||
| 130 | 130 | # Now, print a short notice | |
| 131 | - fi = open(readme_name, 'wb') | ||
| 132 | - print("ICU sources - auto generated by shrink-icu-src.py", file=fi) | ||
| 133 | - print("", file=fi) | ||
| 134 | - print("This directory contains the ICU subset used by --with-intl=full-icu", file=fi) | ||
| 135 | - print("It is a strict subset of ICU %s source files with the following exception(s):" % (icu_ver_major), file=fi) | ||
| 136 | - print("* %s : compressed data file" % (dst_cmp_datafile), file=fi) | ||
| 137 | - print("", file=fi) | ||
| 138 | - print("", file=fi) | ||
| 139 | - print("To rebuild this directory, see ../../tools/icu/README.md", file=fi) | ||
| 140 | - print("", file=fi) | ||
| 141 | - fi.close() | ||
| 131 | + msg_fmt = """\ | ||
| 132 | + ICU sources - auto generated by shrink-icu-src.py\n | ||
| 133 | + This directory contains the ICU subset used by --with-intl=full-icu | ||
| 134 | + It is a strict subset of ICU {} source files with the following exception(s): | ||
| 135 | + * {} : compressed data file\n\n | ||
| 136 | + To rebuild this directory, see ../../tools/icu/README.md\n""" | ||
| 137 | + | ||
| 138 | + with open(readme_name, 'w') as out_file: | ||
| 139 | + print(msg_fmt.format(icu_ver_major, dst_cmp_datafile), file=out_file) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments