Skip to content

Commit

Permalink
Remove unrequired binaries to speed up compilation.
Browse files Browse the repository at this point in the history
Speeds up compilation greatly.

Also bump cmake version to that required in CMakeLists.txt
  • Loading branch information
galv committed Jul 28, 2022
1 parent a8c1cb7 commit 6cd219f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def build_extension(self, ext: setuptools.extension.Extension):
openfst_binaries = [f"fst{operation}" for operation in "arcsort closure compile concat connect convert determinize disambiguate encode epsnormalize equal equivalent invert isomorphic map minimize project prune push randgen relabel replace reverse reweight synchronize topsort union".split(" ")]
fst_binaries = "arpa2fst arpa-to-const-arpa fstdeterminizestar fstrmsymbols fstisstochastic fstminimizeencoded fstmakecontextfst fstmakecontextsyms fstaddsubsequentialloop fstaddselfloops fstrmepslocal fstcomposecontext fsttablecompose fstrand fstdeterminizelog fstphicompose fstcopy fstpushspecial fsts-to-transcripts fsts-project fsts-union fsts-concat transcripts-to-fsts".split(" ")
fst_binaries.extend(openfst_binaries)
# ERROR to fix: "fstcompose" is used in mkgraph_ctc.sh...
fst_binaries = ["arpa2fst", "fsttablecompose", "fstdeterminizestar", "fstminimizeencoded", "fstarcsort", "fstcompile", "fstaddselfloops", "transcripts-to-fsts"]
build_cmd = f'''
cd {self.build_temp}
Expand Down Expand Up @@ -127,7 +129,7 @@ def build_extension(self, ext: setuptools.extension.Extension):
# scripts=(glob.glob("scripts/prepare_TLG_fst/**/*.py") +
# glob.glob("scripts/prepare_TLG_fst/**/*.sh")),
include_package_data=True,
install_requires=["sentencepiece", "cmake", "ninja",],
install_requires=["sentencepiece", "cmake>=3.18", "ninja",],
extras_require={
'testing': [
"kaldi-io",
Expand Down

0 comments on commit 6cd219f

Please sign in to comment.