diff --git a/django_compilemessages.py b/django_compilemessages.py new file mode 100644 index 0000000..35b2853 --- /dev/null +++ b/django_compilemessages.py @@ -0,0 +1,9 @@ +import subprocess + + +def generate_mo_files(): + subprocess.run(["django-admin", "compilemessages"]) + + +if __name__ == "__main__": + generate_mo_files() diff --git a/pyproject.toml b/pyproject.toml index ba24385..83b219b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,3 +80,7 @@ sentry = ["django-q-sentry"] [tool.isort] profile = "black" multi_line_output = 3 + +[tool.poetry.build] +generate-setup-file = false +script = "django_compilemessages.py"