/scripts/paster.py

https://bitbucket.org/cistrome/cistrome-harvard/ · Python · 33 lines · 19 code · 0 blank · 14 comment · 0 complexity · 2f837729792ce82ac63d35f6247a5bbf MD5 · raw file

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