示例#1
0
if not os.path.exists( config ):
    print "Config file does not exist (see 'python %s --help'): %s" % ( sys.argv[0], config )
    sys.exit( 1 )

root = logging.getLogger()
root.setLevel( 10 )
root.addHandler( logging.StreamHandler( sys.stdout ) )

lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), "..", "lib" ) )
sys.path.append( lib )

from galaxy.eggs import Crate, EggNotFetchable
import pkg_resources

if options.platform:
    c = Crate( config, platform = options.platform )
else:
    c = Crate( config )
try:
    if not options.egg_name:
        c.resolve() # Only fetch eggs required by the config
    elif options.egg_name == 'all':
        c.resolve( all=True ) # Fetch everything
    else:
        # Fetch a specific egg
        name = options.egg_name
        try:
            egg = c[name]
        except:
            print "error: %s not in eggs.ini" % name
            sys.exit( 1 )
示例#2
0
if not os.path.exists( config ):
    print "Config file does not exist (see 'python %s --help'): %s" % ( sys.argv[0], config )
    sys.exit( 1 )

root = logging.getLogger()
root.setLevel( 10 )
root.addHandler( logging.StreamHandler( sys.stdout ) )

lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), os.pardir, "lib" ) )
sys.path.insert(1, lib)

from galaxy.eggs import Crate, EggNotFetchable

if options.platform:
    c = Crate( config, platform=options.platform )
else:
    c = Crate( config )
try:
    if not options.egg_name:
        c.resolve()  # Only fetch eggs required by the config
    elif options.egg_name == 'all':
        c.resolve( all=True )  # Fetch everything
    else:
        # Fetch a specific egg
        name = options.egg_name
        try:
            egg = c[name]
        except:
            print "error: %s not in eggs.ini" % name
            sys.exit( 1 )
示例#3
0
    settings in universe_wsgi.ini.
  egg_name - Scramble only this egg (as defined in eggs.ini) or 'all'
    for all eggs (even those not required by your settings).
"""
import os, sys, logging

root = logging.getLogger()
root.setLevel( 10 )
root.addHandler( logging.StreamHandler( sys.stdout ) )

lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), "..", "lib" ) )
sys.path.append( lib )

from galaxy.eggs import Crate, GalaxyConfig

c = Crate()
c.parse()
if len( sys.argv ) == 1:
    galaxy_config = GalaxyConfig()
    ignore = []
    for name in c.get_names():
        if not galaxy_config.check_conditional( name ):
            ignore.append( name )
    c.scramble( ignore=ignore )
else:
    if sys.argv[1] == 'all':
        c.scramble()
    else:
        egg = c.get( sys.argv[1] )
        if egg is None:
            print "error: %s not in eggs.ini" % sys.argv[1]
示例#4
0
                  help='Quiet (no output, only set return code)',
                  default=False)
(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)
root.addHandler(logging.StreamHandler(sys.stdout))

config_arg = ''
if options.config != 'universe_wsgi.ini':
    config_arg = '-c %s' % options.config

lib = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "lib"))
sys.path.append(lib)

from galaxy.eggs import Crate

c = Crate(options.config)
if c.config_missing:
    if not options.quiet:
        print "Some of your Galaxy eggs are out of date.  Please update them"
        print "by running:"
        print "  python scripts/fetch_eggs.py %s" % config_arg
    sys.exit(1)
sys.exit(0)
示例#5
0
            config = name
            break

if not os.path.exists(config):
    print "Config file does not exist (see 'python %s --help'): %s" % (
        sys.argv[0], config)
    sys.exit(1)

root = logging.getLogger()
root.setLevel(10)
root.addHandler(logging.StreamHandler(sys.stdout))

config_arg = ''
if config_set:
    config_arg = '-c %s' % config

lib = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir,
                                   "lib"))
sys.path.insert(1, lib)

from galaxy.eggs import Crate

c = Crate(config)
if c.config_missing:
    if not options.quiet:
        print "Some of your Galaxy eggs are out of date.  Please update them"
        print "by running:"
        print "  python scripts/fetch_eggs.py %s" % config_arg
    sys.exit(1)
sys.exit(0)
示例#6
0
)
(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)
root.addHandler(logging.StreamHandler(sys.stdout))

try:
    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(options.config)
    print "Using Python interpreter at %s, Version %s" % (sys.executable,
                                                          sys.version)
    print "This platform is '%s'" % platform
    print "Override with:"
    print "  make_egg_packager.py <forced-platform>"

shutil.copy(
    os.path.join(os.path.dirname(__file__), 'egg_packager_template.py'),
    'egg_packager-%s.py' % platform)

packager = open('egg_packager-%s.py' % platform, 'a')
示例#7
0
    settings in universe_wsgi.ini.
  egg_name - Scramble only this egg (as defined in eggs.ini) or 'all'
    for all eggs (even those not required by your settings).
"""
import os, sys, logging

root = logging.getLogger()
root.setLevel( 10 )
root.addHandler( logging.StreamHandler( sys.stdout ) )

lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), "..", "lib" ) )
sys.path.append( lib )

from galaxy.eggs import Crate, GalaxyConfig

c = Crate()
c.parse()
galaxy_config = GalaxyConfig()
names = []
if len( sys.argv ) == 1:
    names = c.get_names()
elif sys.argv[1] == 'all':
    names = galaxy_config.always_conditional
else:
# Scramble a specific egg
    egg = c.get( sys.argv[1] )
    if egg is None:
        print "error: %s not in eggs.ini" % sys.argv[1]
        sys.exit( 1 )
    egg.scramble()
    sys.exit( 0 )