1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b92d02a6f315/ Changeset: b92d02a6f315 User: greg Date: 2013-04-19 16:45:04 Summary: White space and import changes to comply with new Galaxy dev team standards. Affected #: 1 file diff -r a80175a97194630c1c668d3bad3cb8891d8ac219 -r b92d02a6f31562a664035adc8576cff6ce6987e9 lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py --- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py @@ -1,9 +1,12 @@ # For Python 2.5 from __future__ import with_statement -import os, shutil, tempfile +import common_util +import logging +import os +import shutil +import tempfile from contextlib import contextmanager -import common_util from galaxy import eggs import pkg_resources @@ -11,7 +14,12 @@ pkg_resources.require('ssh' ) pkg_resources.require( 'Fabric' ) -from fabric.api import env, lcd, local, settings +from fabric.api import env +from fabric.api import lcd +from fabric.api import local +from fabric.api import settings + +log = logging.getLogger( __name__ ) INSTALLATION_LOG = 'INSTALLATION.log' @@ -19,6 +27,7 @@ version = env.version if int( version.split( "." )[ 0 ] ) < 1: raise NotImplementedError( "Install Fabric version 1.0 or later." ) + def set_galaxy_environment( galaxy_user, tool_dependency_dir, host='localhost', shell='/bin/bash -l -c' ): """General Galaxy environment configuration""" env.user = galaxy_user @@ -28,12 +37,14 @@ env.use_sudo = False env.safe_cmd = local return env + @contextmanager def make_tmp_dir(): work_dir = tempfile.mkdtemp() yield work_dir if os.path.exists( work_dir ): local( 'rm -rf %s' % work_dir ) + def handle_command( app, tool_dependency, install_dir, cmd ): sa_session = app.model.context.current output = local( cmd, capture=True ) @@ -44,6 +55,7 @@ sa_session.add( tool_dependency ) sa_session.flush() return output.return_code + def install_and_build_package( app, tool_dependency, actions_dict ): """Install a Galaxy tool dependency package either via a url or a mercurial or git clone command.""" sa_session = app.model.context.current @@ -126,6 +138,7 @@ return_code = handle_command( app, tool_dependency, install_dir, action_dict[ 'command' ] ) if return_code: return + def log_results( command, fabric_AttributeString, file_path ): """ Write attributes of fabric.operations._AttributeString (which is the output of executing command using fabric's local() method) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.