Use call_command to compile translations
This commit is contained in:
parent
0ec6419d8f
commit
9ad80a9972
6
setup.py
6
setup.py
|
@ -21,15 +21,13 @@ class compile_translations(Command):
|
|||
|
||||
def run(self):
|
||||
import os
|
||||
import sys
|
||||
from django.core.management.commands.compilemessages import \
|
||||
compile_messages
|
||||
from django.core.management import call_command
|
||||
for path in ['mellon/']:
|
||||
if path.endswith('.py'):
|
||||
continue
|
||||
curdir = os.getcwd()
|
||||
os.chdir(os.path.realpath(path))
|
||||
compile_messages(sys.stderr)
|
||||
call_command('compilemessages')
|
||||
os.chdir(curdir)
|
||||
|
||||
class build(_build):
|
||||
|
|
Loading…
Reference in New Issue