Don't copy ez_setup.py to egg build directories anymore, and provide a more useful error message when an egg is missing a dependency with a version conflict.

This commit is contained in:
Nate Coraor
2011-02-18 13:22:31 -05:00
parent bde479e1f1
commit 64ff3f715d
2 changed files with 4 additions and 1 deletions
+4
View File
@@ -187,6 +187,10 @@ class Egg( object ):
else:
raise EggNotFetchable( self )
except pkg_resources.VersionConflict, e:
if e.args[1].key != e.args[0].key:
log.error( "One of Galaxy's managed eggs depends on something which is missing, this is almost certainly a bug in the egg distribution." )
log.error( 'Dependency "%s" requires "%s"' % ( e.args[0].project_name, str( e.args[1] ) ) )
raise
# there's a conflicting egg on the path, remove it
return self.version_conflict( e.args[0], e.args[1] )
def version_conflict( self, conflict_dist, conflict_req ):
-1
View File
@@ -54,7 +54,6 @@ class ScrambleEgg( Egg ):
self.copy_build_script()
if not os.path.exists( ScrambleEgg.ez_setup ):
URLRetriever().retrieve( ScrambleEgg.ez_setup_url, ScrambleEgg.ez_setup )
shutil.copyfile( ScrambleEgg.ez_setup, os.path.join( self.buildpath, 'ez_setup.py' ) )
self.run_scramble_script()
new_egg = os.path.join( self.buildpath, 'dist', os.path.basename( self.distribution.location ) )
if not os.path.exists( new_egg ):