コード例 #1
0
ファイル: fpip.py プロジェクト: pombredanne/rsfab
def install_requirements(use_sudo=False, exists_action='i'):
    "Install the required packages from the requirements file using pip"
    func = use_sudo and sudo or run
    with venv():
        with in_project():
            func(
                "pip install -r requirements.txt --exists-action=%s" % exists_action)
コード例 #2
0
ファイル: fpip.py プロジェクト: tjsoftware-co/rsfab
def install_lib(lib_name, use_sudo=False):
    """
        Install lib with given name
    """
    func = use_sudo and sudo or run
    with venv():
        with in_project():
            func("pip install %s" % lib_name)
コード例 #3
0
ファイル: django.py プロジェクト: tjsoftware-co/rsfab
def django_env(command, use_sudo=False):
    """
        run command in django environment
    """
    func = use_sudo and sudo or run

    with venv():
        with in_project():
            func(command)
コード例 #4
0
def django_env(command, use_sudo=False):
    """
        run command in django environment
    """
    func = use_sudo and sudo or run

    with venv():
        with in_project():
            func(command)
コード例 #5
0

def main(argv):
    """Merge include files into html."""

    if argv and \
       len(argv) == 2:

        infile = argv[0]
        outfile = argv[1]

        try:
            write_output(infile, outfile)

        except:
            import traceback
            traceback.print_exc()
            print('Unexpected error while merging %s' % infile)

    else:
        print('usage: python merge-includes.py <infile> <outfile>')



if __name__ == "__main__":
    from virtualenv import venv
    with venv(django_app='goodcrypto'):
        main(sys.argv[1:])