home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 October / maximum-cd-2011-10.iso / DiscContents / digsby_setup.exe / lib / buildutil / common.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-06-22  |  2.6 KB  |  66 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. import commands
  5. import os
  6. import sys
  7. scriptDir = os.path.abspath(sys.path[0])
  8. digsbyDir = os.path.abspath(os.path.join(scriptDir, '..'))
  9. sys.path += [
  10.     digsbyDir]
  11. startDir = os.getcwd()
  12. homeDir = None
  13. if sys.platform.startswith('win'):
  14.     homeDir = os.environ['USERPROFILE']
  15. else:
  16.     homeDir = os.environ['HOME']
  17.  
  18. class BuildDirs:
  19.     
  20.     def __init__(self):
  21.         self.depsDir = None
  22.         self.wxWidgetsDir = None
  23.         self.wxPythonDir = None
  24.         self.wxWebKitDir = None
  25.         self.sipDir = None
  26.         self.wxpyDir = None
  27.         self.boostDir = None
  28.  
  29.     
  30.     def initBuildDirs(self, depsDir, **overrides):
  31.         self.depsDir = depsDir
  32.         self.wxWidgetsDir = os.path.join(self.depsDir, 'wxWidgets')
  33.         self.wxPythonDir = os.path.join(self.wxWidgetsDir, 'wxPython')
  34.         self.wxWebKitDir = os.path.join(self.depsDir, overrides.get('wxWebKit', 'wxWebKit'))
  35.         self.sipDir = os.path.join(self.depsDir, 'sip')
  36.         self.wxpyDir = os.path.join(self.depsDir, 'wxpy')
  37.         self.boostDir = os.path.join(self.depsDir, 'boost_1_42_0')
  38.  
  39.  
  40. buildDirs = BuildDirs()
  41. if sys.platform.startswith('win'):
  42.     common_dir = os.path.dirname(os.path.abspath(__file__))
  43.     buildDirs.initBuildDirs(os.path.join(os.path.abspath(os.path.join(common_dir, '..')), 'msw'), wxWebKit = 'WebKit')
  44.     from buildfileutils import tardep
  45.     boost = tardep('http://mini/mirror/', 'boost_1_42_0', '.tar.gz', 40932853, dirname = buildDirs.boostDir)
  46.  
  47.  
  48. def checkForDeps(swig = False):
  49.     retVal = os.system('which bakefile')
  50.     if retVal != 0:
  51.         print 'ERROR: You must have Bakefile (http://bakefile.org) installed to continue. Exiting...'
  52.         sys.exit(1)
  53.     
  54.     if swig:
  55.         retVal = os.system('which swig')
  56.         if retVal != 0:
  57.             print "ERROR: You must have Robin's SWIG (http://wxpython.wxcommunity.com/tools/) installed to continue. Exiting..."
  58.             sys.exit(1)
  59.         
  60.         if not sys.platform.startswith('win') and commands.getoutput('swig -version').find('1.3.29') == -1:
  61.             print "ERROR: Wrong SWIG. You must install Robin's SWIG (http://wxpython.wxcommunity.com/tools/). Exiting..."
  62.             sys.exit(1)
  63.         
  64.     
  65.  
  66.