mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add the GeneTrack egg. Also includes some enhancements and cleanup of the eggs/fetch/scramble code.
This commit is contained in:
+19
-17
@@ -25,26 +25,28 @@ if len( sys.argv ) == 3:
|
||||
c.platform = { 'peak' : sys.argv[2].rsplit('-',1)[0], 'galaxy' : sys.argv[2] }
|
||||
c.parse()
|
||||
try:
|
||||
galaxy_config = GalaxyConfig()
|
||||
names = []
|
||||
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.fetch( ignore=ignore )
|
||||
names = c.get_names()
|
||||
elif sys.argv[1] == 'all':
|
||||
names = galaxy_config.always_conditional
|
||||
else:
|
||||
if sys.argv[1] == 'all':
|
||||
c.fetch()
|
||||
else:
|
||||
egg = c.get( sys.argv[1] )
|
||||
if egg is None:
|
||||
print "error: %s not in eggs.ini" % sys.argv[1]
|
||||
sys.exit( 1 )
|
||||
egg.fetch()
|
||||
# Fetch 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.fetch()
|
||||
sys.exit( 0 )
|
||||
ignore = filter( lambda x: not galaxy_config.check_conditional( x ), list( names ) )
|
||||
c.fetch( ignore )
|
||||
except EggNotFetchable, e:
|
||||
print "One of the python eggs necessary to run Galaxy couldn't be downloaded"
|
||||
print "automatically. You may want to try building it by hand with:"
|
||||
print " python scripts/scramble.py %s" % e
|
||||
print "One or more of the python eggs necessary to run Galaxy couldn't be"
|
||||
print "downloaded automatically. You may want to try building them by"
|
||||
print "hand with:"
|
||||
for egg in e.eggs:
|
||||
print " python scripts/scramble.py %s" % egg
|
||||
sys.exit( 1 )
|
||||
except PlatformNotSupported, e:
|
||||
print "Your platform (%s) is not supported." % e
|
||||
|
||||
+14
-14
@@ -18,19 +18,19 @@ from galaxy.eggs import Crate, GalaxyConfig
|
||||
|
||||
c = Crate()
|
||||
c.parse()
|
||||
galaxy_config = GalaxyConfig()
|
||||
names = []
|
||||
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 )
|
||||
names = c.get_names()
|
||||
elif sys.argv[1] == 'all':
|
||||
names = galaxy_config.always_conditional
|
||||
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]
|
||||
sys.exit( 1 )
|
||||
egg.scramble()
|
||||
# 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 )
|
||||
ignore = filter( lambda x: not galaxy_config.check_conditional( x ), list( names ) )
|
||||
c.scramble( ignore=ignore )
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import os, sys, shutil
|
||||
|
||||
# change back to the build dir
|
||||
if os.path.dirname( sys.argv[0] ) != "":
|
||||
os.chdir( os.path.dirname( sys.argv[0] ) )
|
||||
|
||||
# find setuptools
|
||||
scramble_lib = os.path.join( "..", "..", "..", "lib" )
|
||||
sys.path.append( scramble_lib )
|
||||
from ez_setup import use_setuptools
|
||||
use_setuptools( download_delay=8, to_dir=scramble_lib )
|
||||
from setuptools import *
|
||||
|
||||
# get the tag
|
||||
if os.access( ".galaxy_tag", os.F_OK ):
|
||||
tagfile = open( ".galaxy_tag", "r" )
|
||||
tag = tagfile.readline().strip()
|
||||
else:
|
||||
tag = None
|
||||
|
||||
# in case you're running this by hand from a dirty module source dir
|
||||
for dir in [ "build", "dist" ]:
|
||||
if os.access( dir, os.F_OK ):
|
||||
print "scramble.py: removing dir:", dir
|
||||
shutil.rmtree( dir )
|
||||
|
||||
# reset args for distutils
|
||||
me = sys.argv[0]
|
||||
sys.argv = [ me ]
|
||||
sys.argv.append( "egg_info" )
|
||||
if tag is not None:
|
||||
#sys.argv.append( "egg_info" )
|
||||
sys.argv.append( "--tag-build=%s" %tag )
|
||||
# svn revision (if any) is handled directly in tag-build
|
||||
sys.argv.append( "--no-svn-revision" )
|
||||
sys.argv.append( "bdist_egg" )
|
||||
|
||||
print "scramble.py: Creating setup.py for GeneTrack"
|
||||
setup_py = """from setuptools import setup, find_packages
|
||||
setup(
|
||||
name = "GeneTrack",
|
||||
version = "2.0.0-beta-1",
|
||||
package_data = {'':["*.*"]},
|
||||
packages = find_packages(),
|
||||
zip_safe = True,
|
||||
)
|
||||
"""
|
||||
open( 'setup.py', 'w' ).write( setup_py )
|
||||
|
||||
|
||||
# do it
|
||||
execfile( "setup.py", globals(), locals() )
|
||||
Reference in New Issue
Block a user