Skip to content

Commit e55fe5a

Browse files
committed
Merge branch 'master' of github.com:openvanilla/McBopomofo
2 parents 4e27388 + 23ece10 commit e55fe5a

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Build project
6565
if: matrix.language == 'swift' || matrix.language == 'cpp'
6666
run: |
67-
xcodebuild -scheme McBopomofoInstaller -configuration Debug build ARCHS=arm64 ONLY_ACTIVE_ARCH=YES
67+
PYTHON=$(which python3) xcodebuild -scheme McBopomofoInstaller -configuration Debug build ARCHS=arm64 ONLY_ACTIVE_ARCH=YES
6868
6969
- name: Perform CodeQL Analysis
7070
uses: github/codeql-action/analyze@v4

Source/Data/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
PYTHON ?= python3
2+
13
.PHONY: sort clean
24

35
all: data.txt data-plain-bpmf.txt associated-phrases-v2.txt
46

57
install: all
68

79
data-plain-bpmf.txt: curation/compilers/plain_bpmf_compiler.py BPMFBase.txt BPMFPunctuations.txt
8-
python3 -m curation.compilers.plain_bpmf_compiler BPMFBase.txt BPMFPunctuations.txt data-plain-bpmf.txt
10+
$(PYTHON) -m curation.compilers.plain_bpmf_compiler BPMFBase.txt BPMFPunctuations.txt data-plain-bpmf.txt
911

1012
data.txt: curation/compilers/main_compiler.py BPMFBase.txt BPMFMappings.txt BPMFPunctuations.txt \
1113
PhraseFreq.txt phrase.occ Symbols.txt Macros.txt\
1214
heterophony1.list heterophony2.list heterophony3.list
13-
python3 -m curation.compilers.main_compiler \
15+
$(PYTHON) -m curation.compilers.main_compiler \
1416
--heterophony1 heterophony1.list \
1517
--heterophony2 heterophony2.list \
1618
--heterophony3 heterophony3.list \
@@ -23,10 +25,10 @@ data.txt: curation/compilers/main_compiler.py BPMFBase.txt BPMFMappings.txt BPMF
2325
--output data.txt
2426

2527
associated-phrases-v2.txt: data.txt curation/builders/phrase_deriver.py associated-punctuation.txt
26-
python3 -m curation.builders.phrase_deriver $< $@ associated-punctuation.txt
28+
$(PYTHON) -m curation.builders.phrase_deriver $< $@ associated-punctuation.txt
2729

2830
PhraseFreq.txt: curation/builders/frequency_builder.py phrase.occ exclusion.txt
29-
python3 -m curation.builders.frequency_builder
31+
$(PYTHON) -m curation.builders.frequency_builder
3032

3133
clean:
3234
rm -f data.txt data-plain-bpmf.txt phrase.list
@@ -68,7 +70,7 @@ tidy:
6870
@sed -i '' -e 's/1/˙/g;s/2/ˊ/g;s/3/ˇ/g;s/4/ˋ/g' BPMFMappings.txt
6971

7072
_phrase.occ: phrase.list
71-
@python3 scripts/count_occurrences.py phrase.list > tmp && mv tmp phrase.occ
73+
@$(PYTHON) scripts/count_occurrences.py phrase.list > tmp && mv tmp phrase.occ
7274

7375
phrase.list: BPMFBase.txt BPMFMappings.txt
7476
awk 'length($$1)<4{print $$1}' BPMFBase.txt > tmp

0 commit comments

Comments
 (0)