add some automatization and localizatipon into wheels

This commit is contained in:
moscap
2021-06-08 07:55:11 +03:00
parent f714f5ad1d
commit f8bebe8115
4 changed files with 28 additions and 85 deletions

27
dodo.py
View File

@@ -4,8 +4,33 @@
import glob
def task_pot():
"""Create bynary wheel distribution"""
return {
'actions': ["""pybabel extract -o todo.pot frontend"""],
'file_dep': glob.glob('frontend/*.py'),
'targets': ['todo.pot']
}
def task_po():
"""Create bynary wheel distribution"""
return {
'actions': ["""pybabel update -D todo -d frontend/po -i todo.pot"""],
'file_dep': ['todo.pot'],
'targets': ['frontend/po/eng/LC_MESSAGES/todo.po']
}
def task_mo():
"""Create bynary wheel distribution"""
return {
'actions': ["""pybabel compile -D todo -i frontend/po/eng/LC_MESSAGES/todo.po -o frontend/po/eng/LC_MESSAGES/todo.mo"""],
'file_dep': ['frontend/po/eng/LC_MESSAGES/todo.po'],
'targets': ['frontend/po/eng/LC_MESSAGES/todo.mo']
}
def task_wheel():
"""Create bynary wheel distribution"""
return {
'actions': ['python3 -m build -w']
'actions': ['python3 -m build -w'],
'task_dep': ['mo']
}