mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-19 10:51:34 +08:00
Explicitly check eggs and fetch when starting, instead of relying on automatic in-process fetching. Also contains a fix for pysqlite egg building
This commit is contained in:
@@ -1,4 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
# explicitly attempt to fetch eggs before running
|
||||
FETCH_EGGS=1
|
||||
for arg in "$@"; do
|
||||
[ "$arg" = "--stop-daemon" ] && FETCH_EGGS=0; break
|
||||
done
|
||||
if [ $FETCH_EGGS -eq 1 ]; then
|
||||
python -ES ./scripts/check_eggs.py quiet
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Some eggs are out of date, attempting to fetch..."
|
||||
python -ES ./scripts/fetch_eggs.py
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Fetch successful."
|
||||
else
|
||||
echo "Fetch failed."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
python -ES ./scripts/paster.py serve universe_wsgi.ini $@
|
||||
|
||||
+11
-3
@@ -11,6 +11,12 @@ root.addHandler( logging.StreamHandler( sys.stdout ) )
|
||||
lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), "..", "lib" ) )
|
||||
sys.path.append( lib )
|
||||
|
||||
try:
|
||||
assert sys.argv[1] == 'quiet'
|
||||
quiet = True
|
||||
except:
|
||||
quiet = False
|
||||
|
||||
from galaxy.eggs import *
|
||||
|
||||
c = Crate()
|
||||
@@ -21,7 +27,9 @@ for name in c.get_names():
|
||||
if not galaxy_config.check_conditional( name ):
|
||||
ignore.append( name )
|
||||
if not c.find( ignore=ignore ):
|
||||
print "Some of your Galaxy eggs are out of date. Please update them"
|
||||
print "by running:"
|
||||
print " python scripts/fetch_eggs.py"
|
||||
if not quiet:
|
||||
print "Some of your Galaxy eggs are out of date. Please update them"
|
||||
print "by running:"
|
||||
print " python scripts/fetch_eggs.py"
|
||||
sys.exit( 1 )
|
||||
sys.exit( 0 )
|
||||
|
||||
@@ -33,10 +33,10 @@ for dir in [ "build", "dist", "sqlite" ]:
|
||||
# tag
|
||||
me = sys.argv[0]
|
||||
sys.argv = [ me ]
|
||||
sys.argv.append( "build_static" )
|
||||
if tag is not None:
|
||||
sys.argv.append( "egg_info" )
|
||||
sys.argv.append( "--tag-build=%s" %tag )
|
||||
sys.argv.append( "build_static" )
|
||||
sys.argv.append( "bdist_egg" )
|
||||
|
||||
# go
|
||||
|
||||
Reference in New Issue
Block a user