1 | """ |
---|
2 | Bootstrap the Galaxy framework. |
---|
3 | |
---|
4 | This should not be called directly! Use the run.sh script in Galaxy's |
---|
5 | top level directly. |
---|
6 | """ |
---|
7 | |
---|
8 | import os, sys |
---|
9 | |
---|
10 | # ensure supported version |
---|
11 | from check_python import check_python |
---|
12 | try: |
---|
13 | check_python() |
---|
14 | except: |
---|
15 | sys.exit( 1 ) |
---|
16 | |
---|
17 | new_path = [ os.path.join( os.getcwd(), "lib" ) ] |
---|
18 | new_path.extend( sys.path[1:] ) # remove scripts/ from the path |
---|
19 | sys.path = new_path |
---|
20 | |
---|
21 | from galaxy import eggs |
---|
22 | import pkg_resources |
---|
23 | |
---|
24 | if 'LOG_TEMPFILES' in os.environ: |
---|
25 | from log_tempfile import TempFile |
---|
26 | _log_tempfile = TempFile() |
---|
27 | import tempfile |
---|
28 | |
---|
29 | pkg_resources.require( "Paste" ) |
---|
30 | pkg_resources.require( "PasteScript" ) |
---|
31 | pkg_resources.require( "PasteDeploy" ) |
---|
32 | |
---|
33 | from paste.script import command |
---|
34 | command.run() |
---|