Skip to content

Commit 3fd0018

Browse files
committed
Use python_cmd and assign to 'python.exe' for windows.
1 parent fbcc33b commit 3fd0018

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

node/dicts.gypi

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,19 @@
77
"dict_merge": "<(module_root_dir)/data/scripts/merge.py",
88
"dict_reverse": "<(module_root_dir)/data/scripts/reverse.py",
99
"input_prefix": "<(module_root_dir)/data/dictionary/",
10-
"output_prefix": "<(PRODUCT_DIR)/"
10+
"output_prefix": "<(PRODUCT_DIR)/",
11+
"python_cmd": "python3"
1112
},
13+
"conditions": [
14+
[
15+
"OS==\"win\"",
16+
{
17+
"variables": {
18+
"python_cmd": "python.exe"
19+
}
20+
}
21+
]
22+
],
1223
"actions": [{
1324
"action_name": "STCharacters",
1425
"variables": {
@@ -69,23 +80,23 @@
6980
"action_name": "TWPhrases.txt",
7081
"inputs": ["<(cmd)"],
7182
"outputs": ["<(output_prefix)TWPhrases.txt"],
72-
"action": ["python3", "<(dict_merge)", "<(input_prefix)TWPhrasesIT.txt", "<(input_prefix)TWPhrasesName.txt", "<(input_prefix)TWPhrasesOther.txt", "<@(_outputs)"]
83+
"action": ["<(python_cmd)", "<(dict_merge)", "<(input_prefix)TWPhrasesIT.txt", "<(input_prefix)TWPhrasesName.txt", "<(input_prefix)TWPhrasesOther.txt", "<@(_outputs)"]
7384
}, {
7485
"action_name": "TWVariantsRev.txt",
7586
"variables": {
7687
"input": "<(input_prefix)TWVariants.txt",
7788
},
7889
"inputs": ["<(input)"],
7990
"outputs": ["<(output_prefix)TWVariantsRev.txt"],
80-
"action": ["python3", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
91+
"action": ["<(python_cmd)", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
8192
}, {
8293
"action_name": "TWPhrasesRev.txt",
8394
"variables": {
8495
"input": "<(output_prefix)TWPhrases.txt",
8596
},
8697
"inputs": ["<(input)"],
8798
"outputs": ["<(output_prefix)TWPhrasesRev.txt"],
88-
"action": ["python3", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
99+
"action": ["<(python_cmd)", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
89100
}, {
90101
"action_name": "TWPhrases",
91102
"variables": {
@@ -133,7 +144,7 @@
133144
},
134145
"inputs": ["<(input)"],
135146
"outputs": ["<(output_prefix)HKVariantsRev.txt"],
136-
"action": ["python3", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
147+
"action": ["<(python_cmd)", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
137148
}, {
138149
"action_name": "HKVariantsRev",
139150
"variables": {
@@ -149,7 +160,7 @@
149160
},
150161
"inputs": ["<(input)"],
151162
"outputs": ["<(output_prefix)JPVariantsRev.txt"],
152-
"action": ["python3", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
163+
"action": ["<(python_cmd)", "<(dict_reverse)", "<(input)", "<@(_outputs)"]
153164
}, {
154165
"action_name": "JPVariantsRev",
155166
"variables": {

0 commit comments

Comments
 (0)