def other_dependencies(ctx, server, environment):
    """Install things that need to be in place before installing the main package."""
    if 'extra_packages' in ctx.releaser:
        server = server.lower()
        extra_pkgs = []
        if server in ["local"]:
            if 'local' in ctx.releaser.extra_packages:
                extra_pkgs.extend(ctx.releaser.extra_packages.local)
        elif server in ["testpypi", "pypitest"]:
            # these are packages not available on the test server, so install them
            # off the regular pypi server
            if 'test' in ctx.releaser.extra_packages and \
                                ctx.releaser.extra_packages.test is not None:
                extra_pkgs.extend(ctx.releaser.extra_packages.test)
        elif server in ["pypi"]:
            if 'pypi' in ctx.releaser.extra_packages and \
                                ctx.releaser.extra_packages.pypi is not None:
                extra_pkgs.extend(ctx.releaser.extra_packages.pypi)
        else:
            print("** Nothing more to install **")

        if extra_pkgs:
            print('** Other Dependencies, based on server', server, '**')

        for pkg in extra_pkgs:
            result = invoke.run('env{0}{1}{0}Scripts{0}pip{2} install {3}'
                                .format(os.sep, environment, PIP_EXT, pkg),
                                hide=True)
            if result.ok:
                print('{}[{}GOOD{}] Installed {}'.format("", GOOD_COLOR,
                                                         RESET_COLOR, pkg))
            else:
                print('{}[{}ERROR{}] Something broke trying to install '
                      'package: {}'.format("", ERROR_COLOR, RESET_COLOR, pkg))
                print(result.stderr)
                sys.exit(1)
def other_dependencies ( ctx , server , environment ) : if 'extra_packages' in ctx . releaser : server = server . lower ( ) extra_pkgs = [ ] if server in [ "local" ] : if 'local' in ctx . releaser . extra_packages : extra_pkgs . extend ( ctx . releaser . extra_packages . local ) elif server in [ "testpypi" , "pypitest" ] : if 'test' in ctx . releaser . extra_packages and ctx . releaser . extra_packages . test is not None : extra_pkgs . extend ( ctx . releaser . extra_packages . test ) elif server in [ "pypi" ] : if 'pypi' in ctx . releaser . extra_packages and ctx . releaser . extra_packages . pypi is not None : extra_pkgs . extend ( ctx . releaser . extra_packages . pypi ) else : print ( "** Nothing more to install **" ) if extra_pkgs : print ( '** Other Dependencies, based on server' , server , '**' ) for pkg in extra_pkgs : result = invoke . run ( 'env{0}{1}{0}Scripts{0}pip{2} install {3}' . format ( os . sep , environment , PIP_EXT , pkg ) , hide = True ) if result . ok : print ( '{}[{}GOOD{}] Installed {}' . format ( "" , GOOD_COLOR , RESET_COLOR , pkg ) ) else : print ( '{}[{}ERROR{}] Something broke trying to install ' 'package: {}' . format ( "" , ERROR_COLOR , RESET_COLOR , pkg ) ) print ( result . stderr ) sys . exit ( 1 )
Install things that need to be in place before installing the main package.