@@ -47,12 +47,14 @@ for a given version is downloading the zipped sources for the common (`core.zip`
4747and tools (` tools.zip ` ) directory subtrees from the Data column in
4848[ CLDR Releases/Downloads] ( https://cldr.unicode.org/index/downloads )
4949
50- Besides a standard JDK 11+, the process also requires [ ant] ( https://ant.apache.org ) and
51- [ maven] ( https://maven.apache.org ) plus the xml-apis.jar from the
52- [ Apache xalan package] ( https://xalan.apache.org/xalan-j/downloads.html ) _ (Is this
53- latter requirement still true?)_ .
50+ Besides a standard JDK 11+, the process also requires [ Ant] ( https://ant.apache.org ) ,
51+ [ Maven] ( https://maven.apache.org ) , and Python (https://www.python.org ).
5452
55- If you do CLDR development you can configure maven as documented at
53+ WARNING: the Ant scripts will soon be REMOVED.
54+ PLEASE execute all the steps using the new Python workflow.
55+ REPORT any problems you encounter, and switch back to the Ant if you don't have another choice.
56+
57+ If you do CLDR development you can configure Maven as documented at
5658[ CLDR Maven setup] ( http://cldr.unicode.org/development/maven ) (non-Eclipse version).
5759
5860But for the CLDR to ICU data conversion, or for regular ICU development this is not needed.
@@ -106,12 +108,12 @@ ticket and a separate PR:
106108
107109There are several environment variables that need to be defined.
108110
109- 1 . Java-, ant-, and maven -related variables
111+ 1 . Java-, Ant- (TO REMOVE), Maven-, and Python -related variables
110112
111113 * ` JAVA_HOME ` : Path to JDK (a directory, containing e.g. ` bin/java ` , ` bin/javac ` ,
112114 etc.); on many systems this can be set using the output of ` /usr/libexec/java_home ` .
113115
114- * ` ANT_OPTS ` : You may want to set ` -Xmx8192m ` to give Java more memory; otherwise
116+ * ` ANT_OPTS ` : (TO REMOVE) You may want to set ` -Xmx8192m ` to give Java more memory; otherwise
115117 it may run out of heap.
116118
117119 * ` MAVEN_ARGS ` : You may want to set ` --no-transfer-progress ` to reduce the noise
@@ -145,9 +147,10 @@ There are several environment variables that need to be defined.
145147
146148## 1 Environment variables
147149
148- 1a. Java, ant, and maven variables, adjust for your system
150+ 1a. Java, Ant (TO REMOVE), Maven, and Python variables, adjust for your system
149151``` sh
150152export JAVA_HOME=/usr/libexec/java_home
153+ # TO REMOVE
151154export ANT_OPTS=" -Xmx8192m"
152155export MAVEN_ARGS=" --no-transfer-progress"
153156```
@@ -172,13 +175,19 @@ export ICU4J_ROOT=$ICU_DIR/icu4j
172175export TOOLS_ROOT=$ICU_DIR /tools
173176```
174177
175- 1d. Directory for logs/notes (create if does not exist)
178+ 1d. Python variables
179+ ``` sh
180+ export PYTHONPATH=$ICU_DIR /tools/py
181+ export PYTHONDONTWRITEBYTECODE=1
182+ ```
183+
184+ 1e. Directory for logs/notes (create if does not exist)
176185``` sh
177186export NOTES=...(some directory)...
178187mkdir -p $NOTES
179188```
180189
181- 1e . The name of the icu data directory for Java (for example ` icudt74b ` )
190+ 1f . The name of the icu data directory for Java (for example ` icudt74b ` )
182191``` sh
183192export ICU_DATA_VER=icudt(version)b
184193```
@@ -248,6 +257,22 @@ mvn clean install -pl :cldr-all,:cldr-code -DskipTests -DskipITs
248257
2492585a. Generate the CLDR production data.
250259
260+ ** // NEW PROCESS, Python. Please use this!**
261+
262+ This process uses Python with ICU4C's ` data/build.py `
263+
264+ * Running ` python build.py --cleanprod ` is necessary to clean out the production data directory
265+ (usually ` $CLDR_TMP_DIR/production ` ), required if any CLDR data has changed.
266+
267+ ``` sh
268+ cd $ICU4C_DIR /source/data
269+ python build.py --proddata
270+ ```
271+
272+ ** // NEW PROCESS - END**
273+
274+ ** // TO REMOVE - Don't execute if the above step works.**
275+
251276This process uses ant with ICU4C's ` data/build.xml `
252277
253278* Running ` ant cleanprod ` is necessary to clean out the production data directory
@@ -261,6 +286,7 @@ ant cleanprod
261286ant setup
262287ant proddata 2>&1 | tee $NOTES /cldr-newData-proddataLog.txt
263288```
289+ ** // TO REMOVE - END**
264290
265291> Note, for CLDR development, at this point tests are sometimes run on the
266292 production data, see
@@ -299,8 +325,13 @@ java -jar target/cldr-to-icu-1.0-SNAPSHOT-jar-with-dependencies.jar --cldrDataDi
299325
3003265c. Update the CLDR testData files needed by ICU4C/J tests, ensuring
301327they are representative of the newest CLDR data.
328+
302329``` sh
303330cd $ICU_DIR /tools/cldr
331+ # NEW PROCESS, Python. Please use this!
332+ python build.py --copy-cldr-testdata
333+
334+ # TO REMOVE. Don't execute if the above step works.
304335ant copy-cldr-testdata
305336```
306337
@@ -453,7 +484,7 @@ cd $ICU4J_ROOT
453484
454485## 13 Rebuild ICU4J with new data, run tests
455486
456- 13a. Run the tests using the maven build
487+ 13a. Run the tests using the Maven build
457488``` sh
458489cd $ICU4J_ROOT
459490mvn clean
@@ -488,7 +519,7 @@ Running a specific test is the same as above:
488519mvn install --pl :core -DICU.exhaustive=10 -Dtest=ExhaustiveNumberTest
489520```
490521
491- ## 14 Investigate and fix maven check test failures
522+ ## 14 Investigate and fix Maven check test failures
492523
493524Fix test cases and repeat from step 13, or fix CLDR data and repeat from
494525step 4, as appropriate, until there are no more failures in ICU4C or ICU4J.
0 commit comments