mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
deps: minor ICU fixes: maint docs/tool, downloader
- Docs used the word "copy" when it really meant a tool is needed.
- README-FULL-ICU.txt was generated in binary mode, but it's a
text file. This breaks on Python3 for maintaining ICU
- The ICU downloader was broken (also probably python3). It's
basically dead code since 1a25e901b7
landed (full icu in repo), unless someone deleted the deps/icu-small
directory from their repo.
Co-Authored-By: Christian Clauss <cclauss@me.com>
PR-URL: https://github.com/nodejs/node/pull/32347
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
131b50d187
commit
b8a794d72b
@ -97,7 +97,7 @@ new Intl.DateTimeFormat('es', { month: 'long' }).format(new Date(9E8));
|
||||
|
||||
…Should return `enero` not `January`.
|
||||
|
||||
* Now, copy `deps/icu` over to `deps/icu-small`
|
||||
* Now, run the shrink tool to update `deps/icu-small` from `deps/icu`
|
||||
|
||||
> :warning: Do not modify any source code in `deps/icu-small` !
|
||||
> See section below about floating patches to ICU.
|
||||
|
@ -63,7 +63,7 @@ def checkHash(targetfile, hashAlgo):
|
||||
digest = hashlib.new(hashAlgo)
|
||||
with open(targetfile, 'rb') as f:
|
||||
chunk = f.read(1024)
|
||||
while chunk != "":
|
||||
while len(chunk) > 0:
|
||||
digest.update(chunk)
|
||||
chunk = f.read(1024)
|
||||
return digest.hexdigest()
|
||||
|
@ -128,14 +128,12 @@ print_size(dst_cmp_datafile)
|
||||
readme_name = os.path.join(options.icudst, "README-FULL-ICU.txt" )
|
||||
|
||||
# Now, print a short notice
|
||||
fi = open(readme_name, 'wb')
|
||||
print("ICU sources - auto generated by shrink-icu-src.py", file=fi)
|
||||
print("", file=fi)
|
||||
print("This directory contains the ICU subset used by --with-intl=full-icu", file=fi)
|
||||
print("It is a strict subset of ICU %s source files with the following exception(s):" % (icu_ver_major), file=fi)
|
||||
print("* %s : compressed data file" % (dst_cmp_datafile), file=fi)
|
||||
print("", file=fi)
|
||||
print("", file=fi)
|
||||
print("To rebuild this directory, see ../../tools/icu/README.md", file=fi)
|
||||
print("", file=fi)
|
||||
fi.close()
|
||||
msg_fmt = """\
|
||||
ICU sources - auto generated by shrink-icu-src.py\n
|
||||
This directory contains the ICU subset used by --with-intl=full-icu
|
||||
It is a strict subset of ICU {} source files with the following exception(s):
|
||||
* {} : compressed data file\n\n
|
||||
To rebuild this directory, see ../../tools/icu/README.md\n"""
|
||||
|
||||
with open(readme_name, 'w') as out_file:
|
||||
print(msg_fmt.format(icu_ver_major, dst_cmp_datafile), file=out_file)
|
||||
|
Loading…
Reference in New Issue
Block a user