From 64ff3f715d5d60a5a1c8d7c1eb69806d352a1e09 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 18 Feb 2011 13:22:31 -0500 Subject: [PATCH] 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. --- lib/galaxy/eggs/__init__.py | 4 ++++ lib/galaxy/eggs/scramble.py | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/eggs/__init__.py b/lib/galaxy/eggs/__init__.py index 52952ecef31..a6937d8cf7c 100644 --- a/lib/galaxy/eggs/__init__.py +++ b/lib/galaxy/eggs/__init__.py @@ -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 ): diff --git a/lib/galaxy/eggs/scramble.py b/lib/galaxy/eggs/scramble.py index 5106a76d19c..bd800e839fe 100644 --- a/lib/galaxy/eggs/scramble.py +++ b/lib/galaxy/eggs/scramble.py @@ -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 ):