Compile messages on setup
This commit is contained in:
parent
5ce62c15f7
commit
a34dae2ad0
|
@ -23,3 +23,6 @@ save.json
|
||||||
|
|
||||||
# Don't commit docs output
|
# Don't commit docs output
|
||||||
docs/_build
|
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
|
# Copyright (C) 2020 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import os
|
import subprocess
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
with open("README.md", "r") as f:
|
with open("README.md", "r") as f:
|
||||||
long_description = f.read()
|
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(
|
setup(
|
||||||
name="squirrel-battle",
|
name="squirrel-battle",
|
||||||
version="3.14.1",
|
version="3.14.1",
|
||||||
|
@ -36,7 +46,7 @@ setup(
|
||||||
],
|
],
|
||||||
python_requires='>=3.6',
|
python_requires='>=3.6',
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
package_data={"squirrelbattle": ["assets/*", "locale/*"]},
|
package_data={"squirrelbattle": ["assets/*", "locale/*/*/*"]},
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": [
|
"console_scripts": [
|
||||||
"squirrel-battle = squirrelbattle.bootstrap:Bootstrap.run_game",
|
"squirrel-battle = squirrelbattle.bootstrap:Bootstrap.run_game",
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue