Changeset df83aa4 in sasview
- Timestamp:
- Sep 14, 2011 12:53:25 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6a7cf2c
- Parents:
- 296b9c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/setup_all.py
r6367ec5 rdf83aa4 24 24 25 25 26 # Release version 1.927 SANSMODELS = "0.9.1"28 DATALOADER = "0.9"29 GUIFRAME = "0.9.1"30 SANSVIEW = "1.9.1"31 PLOTTOOLS = "0.9.1"32 UTIL = "0.9.1"33 PARK = "1.2.1"34 PARK_INTEG = "0.9.1"35 PRVIEW = "0.9.1"36 PR_INV = "0.9"37 CALCULATOR = "0.9.1"38 CALC_VIEW = "0.9"39 INVARIANT = "0.9.1"40 INV_VIEW = "0.9"41 FIT_VIEW = "0.9.1"42 43 44 26 def check_system(): 45 27 """ … … 47 29 """ 48 30 is_ok = True 31 msg = '' 49 32 try: 50 33 import wx 51 34 if not wx.__version__.count('2.8.11') and \ 52 35 not wx.__version__.count('2.8.12'): 53 print "wx: Recommending version 2.8.11 or 2.8.12" 54 except: 55 is_ok = False 56 print "Error: wxpython 2.8.11 (12) missing" 36 mesg = "wx: Recommending version 2.8.11 or 2.8.12" 37 msg += mesg + "\n" 38 print mesg 39 except: 40 is_ok = False 41 mesg = "Error: wxpython 2.8.11 (12) missing" 42 msg += mesg + "\n" 43 print mesg 57 44 logging.error("wxpython missing") 58 45 … … 61 48 if not matplotlib.__version__.count('0.99.0') and \ 62 49 not matplotlib.__version__.count('0.99.1'): 63 print "matplotlib: Recommending version 0.99.0 or 0.99.1" 64 except: 65 is_ok = False 66 print "Error: matplotlib 0.99.0 (1) missing" 50 mesg = "matplotlib: Recommending version 0.99.0 or 0.99.1" 51 msg += mesg + "\n" 52 print mesg 53 except: 54 is_ok = False 55 mesg = "Error: matplotlib 0.99.0 (1) missing" 56 msg += mesg + "\n" 57 print mesg 67 58 logging.error("matplotlib missing") 68 59 … … 70 61 import numpy 71 62 if not numpy.__version__.count('1.4.1'): 72 print "numpy: Recommending version 1.4.1" 73 except: 74 is_ok = False 75 print "Error: numpy 1.4.1 missing" 63 mesg = "numpy: Recommending version 1.4.1" 64 msg += mesg + "\n" 65 print mesg 66 except: 67 is_ok = False 68 mesg = "Error: numpy 1.4.1 missing" 69 msg += mesg + "\n" 70 print mesg 76 71 logging.error("numpy missing") 77 72 … … 79 74 import scipy 80 75 if not scipy.__version__.count('0.7.2'): 81 print "scipy: Recommending version 0.7.2" 82 except: 83 is_ok = False 84 print "Error: scipy 0.7.2 missing" 76 mesg = "scipy: Recommending version 0.7.2" 77 msg += mesg + "\n" 78 print mesg 79 except: 80 is_ok = False 81 mesg = "Error: scipy 0.7.2 missing" 82 msg += mesg + "\n" 83 print mesg 85 84 logging.error("scipy missing") 86 85 … … 88 87 import periodictable 89 88 if not periodictable.__version__.count('1.3.0'): 90 print "periodictable: Recommending version 1.3.0" 89 mesg = "periodictable: Recommending version 1.3.0" 90 msg += mesg + "\n" 91 print mesg 91 92 except: 92 93 print "Trying to install perodic table..." … … 96 97 except: 97 98 is_ok = False 99 mesg = "Error: periodictable missing" 100 msg += mesg + "\n" 98 101 print "easy_install periodictable failed" 99 102 logging.error("periodictable missing") … … 105 108 except: 106 109 is_ok = False 107 print "comtypes missing" 110 mesg = "comtypes missing" 111 msg += mesg + "\n" 112 print mesg 108 113 logging.error("comtypes missing") 109 114 … … 113 118 except: 114 119 is_ok = False 115 print "pywin32 missing" 120 mesg = "pywin32 missing" 121 msg += mesg + "\n" 122 print mesg 116 123 logging.error("pywin32 missing") 117 124 … … 124 131 except: 125 132 is_ok = False 133 mesg = "pyparsing missing" 134 msg += mesg + "\n" 135 print mesg 126 136 print "easy_install pyparsing failed" 127 137 logging.error("pyparsing missing") … … 129 139 if os.system("gcc -dumpversion")==1: 130 140 is_ok = False 131 logging.error("missing mingw") 132 133 return is_ok 141 mesg = "missing mingw/gcc" 142 msg += mesg + "\n" 143 print mesg 144 logging.error("missing mingw/gcc") 145 146 return is_ok, msg 134 147 135 148 … … 146 159 try: 147 160 os.chdir(setup_dir) 148 os.system("%s setup.py install" % PYTHON) 149 except: 150 logging.error("Install failed on %s"% setup_dir) 161 os.system("%s setup.py install" % PYTHON) 162 print "Installation %s successful.." % setup_dir 163 except: 164 logging.error("Installation failed on %s"% setup_dir) 151 165 logging.error(sys.exc_value) 152 166 raw_input("Press enter to continue\n") … … 159 173 wd = os.getcwd() 160 174 os.chdir(wd) 161 162 if release: 163 install_pkg("sansdataloader-%s" % DATALOADER) 164 else: 165 install_pkg("sansdataloader") 166 167 os.chdir(wd) 168 if release: 169 install_pkg("sansmodels-%s" % SANSMODELS) 170 else: 171 install_pkg("sansmodels") 172 173 os.chdir(wd) 174 if release: 175 install_pkg("sansguiframe-%s" % GUIFRAME) 176 else: 177 install_pkg("sansguiframe") 178 179 os.chdir(wd) 180 if release: 181 install_pkg("plottools-%s" % PLOTTOOLS) 182 else: 183 install_pkg("plottools") 184 185 os.chdir(wd) 186 if release: 187 install_pkg("util-%s" % UTIL) 188 else: 189 install_pkg("util") 190 191 os.chdir(wd) 192 if release: 193 install_pkg("park_integration-%s" % PARK_INTEG) 194 else: 195 install_pkg("park_integration") 196 197 os.chdir(wd) 198 if release: 199 install_pkg("inversionview-%s" % PRVIEW) 200 else: 201 install_pkg("inversionview") 202 203 os.chdir(wd) 204 if release: 205 install_pkg("pr_inversion-%s" % PR_INV) 206 else: 207 install_pkg("pr_inversion") 208 209 os.chdir(wd) 210 if release: 211 install_pkg("sansinvariant-%s" % INVARIANT) 212 else: 213 install_pkg("sansinvariant") 214 215 os.chdir(wd) 216 if release: 217 install_pkg("invariantview-%s" % INV_VIEW) 218 else: 219 install_pkg("invariantview") 220 221 os.chdir(wd) 222 if release: 223 install_pkg("calculatorview-%s" % CALC_VIEW) 224 else: 225 install_pkg("calculatorview") 226 227 os.chdir(wd) 228 if release: 229 install_pkg("sanscalculator-%s" % CALCULATOR) 230 else: 231 install_pkg("sanscalculator") 232 233 234 os.chdir(wd) 235 if release: 236 install_pkg("park-%s" % PARK) 237 else: 238 install_pkg("park-1.2") 239 240 os.chdir(wd) 241 if release: 242 install_pkg("fittingview-%s" % FIT_VIEW) 243 else: 244 install_pkg("fittingview") 245 246 os.chdir(wd) 247 if release: 248 setup_dir = "sansview-%s" % SANSVIEW 249 else: 250 setup_dir = "sansview" 175 for folder in os.listdir(wd): 176 if os.path.isdir(os.path.join(wd, folder)): 177 if folder.count('sansview') > 0: 178 setup_dir = folder 179 try: 180 install_pkg(folder) 181 except: 182 pass 183 os.chdir(wd) 184 251 185 252 186 # run sansview … … 290 224 if __name__ == "__main__": 291 225 292 if check_system(): 226 is_ok, _msg = check_system() 227 if is_ok: 293 228 if len(sys.argv)==1: 294 229 # If there is no argument, build the installer … … 305 240 print " -t: Builds SansView from the trunk" 306 241 307 elif sys.argv[1]=="-n":308 # Print out release URLs309 print SANSMODELS_URL310 print DATALOADER_URL311 print GUIFRAME_URL312 print PLOTTOOLS_URL313 print UTIL_URL314 print SANSVIEW_URL315 print PARK_INTEG_URL316 print PARK_URL317 print PRVIEW318 print PR_INV319 print FIT_URL320 242 else: 321 logging.info("Build script for SansView %s" % SANSVIEW)243 logging.info("Build script for SansView") 322 244 print "Warning: This script will delete the previous SansView packages..." 323 245 prepare() … … 331 253 332 254 333 255 print _msg 334 256 raw_input("Press enter to continue\n") 335 257 336 258 else: 259 print _msg 337 260 raw_input("Press enter and install the missing packages before re-run this scripts.\n")
Note: See TracChangeset
for help on using the changeset viewer.