commit/galaxy-central: natefoo: Bugfix for the offline egg packaging script.

1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/d2433ed56951/ changeset: d2433ed56951 user: natefoo date: 2011-08-03 16:13:01 summary: Bugfix for the offline egg packaging script. affected #: 1 file (608 bytes) --- a/scripts/make_egg_packager.py Wed Aug 03 02:09:42 2011 -0400 +++ b/scripts/make_egg_packager.py Wed Aug 03 10:13:01 2011 -0400 @@ -1,6 +1,16 @@ #!/usr/bin/env python import os, sys, logging, shutil +from optparse import OptionParser + +parser = OptionParser() +parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default='universe_wsgi.ini' ) +parser.add_option( '-p', '--platform', dest='platform', help='Fetch for a specific platform (by default, eggs are fetched for *this* platform' ) +( options, args ) = parser.parse_args() + +if not os.path.exists( options.config ): + print "Config file does not exist (see 'python %s --help'): %s" % ( sys.argv[0], options.config ) + sys.exit( 1 ) root = logging.getLogger() root.setLevel( 10 ) @@ -13,12 +23,13 @@ import pkg_resources try: - platform = sys.argv[1] - c = Crate( platform = platform ) + assert options.platform + platform = options.platform + c = Crate( options.config, platform = platform ) print "Platform forced to '%s'" % platform except: platform = '-'.join( ( py, pkg_resources.get_platform() ) ) - c = Crate() + c = Crate( options.config ) print "Using Python interpreter at %s, Version %s" % ( sys.executable, sys.version ) print "This platform is '%s'" % platform print "Override with:" 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.
participants (1)
-
Bitbucket