diff --git a/eggs.ini b/eggs.ini index 9def2ef00bb..60a09b41c64 100644 --- a/eggs.ini +++ b/eggs.ini @@ -8,6 +8,8 @@ [general] repository = http://eggs.g2.bx.psu.edu +; these eggs must be scrambled for your local environment +no_download = pbs_python DRMAA_python [eggs:platform] bx_python = 0.5.0 diff --git a/lib/galaxy/eggs/__init__.py b/lib/galaxy/eggs/__init__.py index 4c1c05d722b..3c625dd3bfe 100644 --- a/lib/galaxy/eggs/__init__.py +++ b/lib/galaxy/eggs/__init__.py @@ -256,6 +256,7 @@ class Crate( object ): self.eggs = {} self.config = CSConfigParser() self.repo = None + self.no_download = [] self.platform = { 'peak' : get_platform( platform=True, peak=True ), 'galaxy' : get_platform( platform=True, peak=False ) } self.noplatform = { 'peak' : get_platform( platform=False, peak=True ), 'galaxy' : get_platform( platform=False, peak=False ) } def parse( self ): @@ -263,10 +264,11 @@ class Crate( object ): raise Exception( "unable to read egg config from %s" % Crate.config_file ) try: self.repo = self.config.get( "general", "repository" ) + self.no_download = self.config.get( "general", "no_download" ).split() except ConfigParser.NoSectionError: raise Exception( "eggs.ini is missing required section [general]" ) - except ConfigParser.NoOptionError: - raise Exception( "eggs.ini is missing required [general] option 'repository'" ) + #except ConfigParser.NoOptionError: + # raise Exception( "eggs.ini is missing required [general] option 'repository'" ) try: platform_eggs = self.config.items( "eggs:platform" ) noplatform_eggs = self.config.items( "eggs:noplatform" ) @@ -303,13 +305,14 @@ class Crate( object ): if len( missing ): return False return True - def fetch( self, ignore=None ): + def fetch( self, ignore=[] ): """ Fetch all eggs in the crate (ignoring any that you want to ignore). If your platform isn't available, it'll attempt to download all the noplatform eggs before failing. """ skip_platform = False + ignore.extend( self.no_download ) try: f = urllib2.urlopen( "%s/%s" % ( self.repo, self.platform['galaxy'] ) ) f.close()