Compile messages on setup
This commit is contained in:
parent
5ce62c15f7
commit
a34dae2ad0
3
.gitignore
vendored
3
.gitignore
vendored
@ -23,3 +23,6 @@ save.json
|
||||
|
||||
# Don't commit docs output
|
||||
docs/_build
|
||||
|
||||
# Don't commit compiled messages
|
||||
*.mo
|
||||
|
14
setup.py
14
setup.py
@ -3,13 +3,23 @@
|
||||
# Copyright (C) 2020 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
with open("README.md", "r") as f:
|
||||
long_description = f.read()
|
||||
|
||||
# Compile messages
|
||||
for language in ["en", "fr"]:
|
||||
args = ["msgfmt", "--check-format",
|
||||
"-o", f"squirrelbattle/locale/{language}/LC_MESSAGES"
|
||||
"/squirrelbattle.mo",
|
||||
f"squirrelbattle/locale/{language}/LC_MESSAGES"
|
||||
"/squirrelbattle.po"]
|
||||
print(f"Compiling {language} messages...")
|
||||
subprocess.Popen(args)
|
||||
|
||||
setup(
|
||||
name="squirrel-battle",
|
||||
version="3.14.1",
|
||||
@ -36,7 +46,7 @@ setup(
|
||||
],
|
||||
python_requires='>=3.6',
|
||||
include_package_data=True,
|
||||
package_data={"squirrelbattle": ["assets/*", "locale/*"]},
|
||||
package_data={"squirrelbattle": ["assets/*", "locale/*/*/*"]},
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"squirrel-battle = squirrelbattle.bootstrap:Bootstrap.run_game",
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user