mod = __import__(importable)
        assert os.path.dirname(mod.__path__[0]) == os.path.dirname(
            provider.module_path)
        print "OK"

    sys.exit(0)

else:

    build_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                             'scramble', 'build')
    if os.path.exists(build_dir):
        raise Exception('Build dir must be removed before testing: %s' %
                        build_dir)

    name = sys.argv[1]

    from galaxy.eggs.dist import DistScrambleCrate

    c = DistScrambleCrate()

    for egg in c[name]:
        print 'Checking %s %s for %s on %s' % (name, egg.version, egg.platform,
                                               egg.build_host)
        p = subprocess.Popen(
            'ssh %s %s %s %s %s' %
            (egg.build_host, egg.python, os.path.abspath(__file__),
             egg.distribution.location, egg.platform),
            shell=True)
        p.wait()
Ejemplo n.º 2
0
root.setLevel(10)
root.addHandler(logging.StreamHandler(sys.stdout))

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

from galaxy.eggs.dist import DistScrambleCrate, ScrambleFailure
from galaxy.eggs import EggNotFetchable

if not options.egg_name:
    print "ERROR: You must specify an egg to scramble (-e)"
    parser.print_help()
    sys.exit(1)

if options.platform:
    c = DistScrambleCrate(None, options.platform)
else:
    c = DistScrambleCrate(None)

try:
    eggs = c[options.egg_name]
except:
    print "ERROR: %s not in eggs.ini" % options.egg_name
    sys.exit(1)
failed = []
for egg in eggs:
    try:
        for dependency in egg.dependencies:
            print "Checking %s on %s dependency: %s" % (egg.name, egg.platform,
                                                        dependency)
            # this could be in a better data structure...