Changeset 1345
- Timestamp:
- 05/22/08 03:50:30 (8 months ago)
- Files:
-
- wine-doors/trunk/setup.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wine-doors/trunk/setup.py
r1294 r1345 14 14 if not os.path.isdir( srcdir + "/" + file ): 15 15 shutil.copy( srcdir + "/" + file, dstdir + "/" + file ) 16 17 def findmodule( module ): 18 try: 19 __import__( module ) 20 return True 21 except: 22 return False 23 24 def findexec( executable ): 25 if commands.getstatusoutput( "which " + executable )[0] == 0: 26 return True 27 return False 16 28 17 29 def copygzip( srcfile, dstfile ): … … 122 134 print "Performing system install with parameters: " + final + " " + prefix 123 135 136 # Required deps 137 missing_required = [] 138 124 139 # Check deps 125 140 print "Checking dependencies" 126 141 print " wine . . . ", 127 if commands.getstatusoutput( "which wine" )[0] == 0:142 if findexec( "wine" ): 128 143 print "Found" 129 144 else: 130 145 print "Not found !" 146 missing_required.append("wine") 147 131 148 print " cabextract . . . ", 132 if commands.getstatusoutput( "which cabextract" )[0] == 0:149 if findexec( "cabextract" ): 133 150 print "Found" 134 151 else: 135 152 print "Not found !" 153 missing_required.append("cabextract") 154 136 155 print " orange . . . ", 137 if commands.getstatusoutput( "which orange" )[0] == 0:156 if findexec( "orange" ): 138 157 print "Found" 139 158 else: 140 159 print "Not found !" 160 missing_required.append("orange") 161 141 162 print " ps . . . ", 142 if commands.getstatusoutput( "which ps" )[0] == 0:163 if findexec( "ps" ): 143 164 print "Found" 144 165 else: 145 166 print "Not found !" 167 missing_required.append("ps") 168 169 # Python modules 146 170 print " pygtk . . . (python-gtk2)", 147 try: 148 import gtk, gobject 171 if findmodule( "gtk" ) and findmodule( "gobject" ): 149 172 hasui = True 150 173 print "Found" 151 e xcept:174 else: 152 175 print "Not found" 153 176 hasui = False 154 177 155 178 print " pycairo . . . (python-cairo)", 156 try: 157 import cairo 179 if findmodule( "cairo" ): 158 180 hasui = True 159 181 print "Found" 160 e xcept:182 else: 161 183 print "Not found" 162 184 hasui = False 163 185 164 186 print " rsvg . . . (python-gnome2-desktop)", 165 try: 166 import rsvg 187 if findmodule( "rsvg" ): 167 188 hasui = True 168 189 print "Found" 169 e xcept:190 else: 170 191 print "Not found" 171 192 hasui = False 193 194 if missing_required: 195 print 196 print "The following dependancies are required to install wine-doors:" 197 print missing_required 198 sys.exit(1) 172 199 173 200 if not hasui:
