Changeset 1349:10de3889b106
- Timestamp:
- 05/30/08 16:37:39
(7 months ago)
- Author:
- Nate Coraor <nate@bx.psu.edu>
- branch:
- default
- convert_revision:
- svn:9bcadc22-80f8-0310-8a53-c8f022958886/galaxy/trunk@2710
- Message:
Add a no_download parameter to eggs.ini so scramble-only eggs can be
ignored when using 'fetch_eggs.py all'.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1348 |
r1349 |
|
| 9 | 9 | [general] |
|---|
| 10 | 10 | repository = http://eggs.g2.bx.psu.edu |
|---|
| | 11 | ; these eggs must be scrambled for your local environment |
|---|
| | 12 | no_download = pbs_python DRMAA_python |
|---|
| 11 | 13 | |
|---|
| 12 | 14 | [eggs:platform] |
|---|
| r1311 |
r1349 |
|
| 257 | 257 | self.config = CSConfigParser() |
|---|
| 258 | 258 | self.repo = None |
|---|
| | 259 | self.no_download = [] |
|---|
| 259 | 260 | self.platform = { 'peak' : get_platform( platform=True, peak=True ), 'galaxy' : get_platform( platform=True, peak=False ) } |
|---|
| 260 | 261 | self.noplatform = { 'peak' : get_platform( platform=False, peak=True ), 'galaxy' : get_platform( platform=False, peak=False ) } |
|---|
| … | … | |
| 264 | 265 | try: |
|---|
| 265 | 266 | self.repo = self.config.get( "general", "repository" ) |
|---|
| | 267 | self.no_download = self.config.get( "general", "no_download" ).split() |
|---|
| 266 | 268 | except ConfigParser.NoSectionError: |
|---|
| 267 | 269 | raise Exception( "eggs.ini is missing required section [general]" ) |
|---|
| 268 | | except ConfigParser.NoOptionError: |
|---|
| 269 | | raise Exception( "eggs.ini is missing required [general] option 'repository'" ) |
|---|
| | 270 | #except ConfigParser.NoOptionError: |
|---|
| | 271 | # raise Exception( "eggs.ini is missing required [general] option 'repository'" ) |
|---|
| 270 | 272 | try: |
|---|
| 271 | 273 | platform_eggs = self.config.items( "eggs:platform" ) |
|---|
| … | … | |
| 304 | 306 | return False |
|---|
| 305 | 307 | return True |
|---|
| 306 | | def fetch( self, ignore=None ): |
|---|
| | 308 | def fetch( self, ignore=[] ): |
|---|
| 307 | 309 | """ |
|---|
| 308 | 310 | Fetch all eggs in the crate (ignoring any that you want to |
|---|
| … | … | |
| 311 | 313 | """ |
|---|
| 312 | 314 | skip_platform = False |
|---|
| | 315 | ignore.extend( self.no_download ) |
|---|
| 313 | 316 | try: |
|---|
| 314 | 317 | f = urllib2.urlopen( "%s/%s" % ( self.repo, self.platform['galaxy'] ) ) |
|---|