/scripts/scramble/scripts/pysam-solaris.py

https://bitbucket.org/cistrome/cistrome-harvard/ · Python · 30 lines · 19 code · 6 blank · 5 comment · 3 complexity · ff5c8d7133939e547611fef50c9706b4 MD5 · raw file

  1. import os, sys
  2. # change back to the build dir
  3. if os.path.dirname( sys.argv[0] ) != "":
  4. os.chdir( os.path.dirname( sys.argv[0] ) )
  5. # find setuptools
  6. sys.path.append( os.path.join( '..', '..', '..', 'lib' ) )
  7. from scramble_lib import *
  8. tag = get_tag() # get the tag
  9. clean() # clean up any existing stuff (could happen if you run scramble.py by hand)
  10. # reset args for distutils
  11. me = sys.argv[0]
  12. sys.argv = [ me ]
  13. sys.argv.append( "egg_info" )
  14. if tag is not None:
  15. sys.argv.append( "--tag-build=%s" %tag )
  16. # svn revision (if any) is handled directly in tag-build
  17. sys.argv.append( "--no-svn-revision" )
  18. sys.argv.append( "bdist_egg" )
  19. cc = get_solaris_compiler()
  20. if cc == 'cc':
  21. os.environ['CFLAGS'] = '-xc99=all'
  22. os.environ['LDFLAGS'] = '-lsocket -lnsl'
  23. # do it
  24. execfile( "setup.py", globals(), locals() )