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:
Nate Coraor
2009-11-16 14:42:09 -05:00
parent 20ac20385f
commit a3d62f4036
3 changed files with 31 additions and 4 deletions
+19
View File
@@ -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
View File
@@ -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 )
+1 -1
View File
@@ -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