Skip to content

Commit

Permalink
add download flag
Browse files Browse the repository at this point in the history
  • Loading branch information
synodriver committed Aug 12, 2022
1 parent adec254 commit 20c0e71
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 @@ -191,11 +191,13 @@ def update_to(self, b=1, bsize=1, tsize=None):
) as t: # all optional kwargs
urlretrieve(_DICT_URL, filename, reporthook=t.update_to)
t.total = t.n
print("Download complete")

print("Extracting tar file {}".format(filename))
with tarfile.open(filename, mode="r|gz") as f:
f.extractall(path="./")
os.remove(filename)

print("Extract complete")

# generate config.h for mecab
# NOTE: need to run cmake to generate config.h
Expand Down

0 comments on commit 20c0e71

Please sign in to comment.