Exemplo n.º 1
0
def compile_po(full_file_path):
    file_name = os.path.basename(full_file_path)
    dir_name = os.path.dirname(full_file_path)

    compile_command = Command()
    compile_command.verbosity = 0
    compile_command.compile_messages([(dir_name, file_name)])
Exemplo n.º 2
0
 def run(self):
     _install_lib.run(self)
     from django.core.management.commands.compilemessages \
         import Command
     os.chdir("bingo")
     cmd = Command()
     cmd.handle(verbosity=0, exclude=[], locale=[])
     os.chdir("..")
Exemplo n.º 3
0
#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import codecs
import os
import re
import sys


# When creating the sdist, make sure the django.mo file also exists:
if 'sdist' in sys.argv or 'develop' in sys.argv:
    try:
        os.chdir('polymorphic_tree')

        from django.core.management.commands.compilemessages import Command
        command = Command()
        command.execute(stdout=sys.stderr, verbosity=1)
    except:
        # < Django 1.7
        from django.core.management.commands.compilemessages import compile_messages
        compile_messages(sys.stderr)
    finally:
        os.chdir('..')


def read(*parts):
    file_path = path.join(path.dirname(__file__), *parts)
    return codecs.open(file_path, encoding='utf-8').read()


def find_version(*parts):