Changeset d3d955e in sasview
- Timestamp:
- Apr 28, 2010 5:19:00 PM (15 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:
- 91f151a
- Parents:
- 017ec0b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/build_sansview.py
rd1b43cd rd3d955e 34 34 import time 35 35 timestamp = int(time.time()) 36 CWD = os.getcwd() 37 36 38 INSTALL_FOLDER = "install_%s" % str(timestamp) 39 LIB_FOLDER = "%s\%s" % (CWD, INSTALL_FOLDER) 37 40 38 41 logging.basicConfig(level=logging.INFO, … … 41 44 filemode='w') 42 45 43 CWD = os.getcwd()44 46 45 47 # On Windows, the python executable is not always on the path. … … 53 55 INNO = "\"c:\Program Files\Inno Setup 5\ISCC\"" 54 56 55 # Release version 1. 0.056 SANSMODELS = "0.4. 5"57 DATALOADER = "0.2. 5"58 GUICOMM = "0.1. 3"59 GUIFRAME = "0.1. 8"60 SANSVIEW = "1. 0.0"61 PLOTTOOLS = "0.1. 7"62 UTIL = "0.1. 3"63 PARK = "1.2" 64 PARK_INTEG = "0.1. 3"57 # Release version 1.3.0 58 SANSMODELS = "0.4.6" 59 DATALOADER = "0.2.6" 60 GUICOMM = "0.1.4" 61 GUIFRAME = "0.1.9" 62 SANSVIEW = "1.3.0" 63 PLOTTOOLS = "0.1.8" 64 UTIL = "0.1.4" 65 PARK = "1.2" # May need update 66 PARK_INTEG = "0.1.4" 65 67 PRVIEW = "0.3.1" 66 PR_INV = "0.2.3" 68 PR_INV = "0.2.4" 69 CALCULATOR = "0.1.0" 70 CALC_VIEW = "0.1.0" 71 INVARIANT = "0.1.0" 72 INV_VIEW = "0.1.0" 73 THEORY_VIEW= "0.1.0" 74 ELEMENTS = "1.0.2" 67 75 68 76 # URLs for SVN repos … … 78 86 PRVIEW_URL = "svn://danse.us/sans/releases/prview-%s" % PRVIEW 79 87 PR_INV_URL = "svn://danse.us/sans/releases/pr_inversion-%s" % PR_INV 80 88 CALC_URL = "svn://danse.us/sans/releases/calculator-%s" % CALCULATOR 89 CALC_VIEW_URL = "svn://danse.us/sans/releases/calculatorview-%s" % CALC_VIEW 90 INV_URL = "svn://danse.us/sans/releases/Invariant-%s" % INVARIANT 91 INV_VIEW_URL = "svn://danse.us/sans/releases/invariantview-%s" % INV_VIEW 92 THEO_VIEW_URL = "svn://danse.us/sans/releases/theoryview-%s" % THEORY_VIEW 93 ELEMENTS_URL = "svn://danse.us/common/elements/releases/elements-%s" % ELEMENTS 81 94 82 95 def check_system(): … … 115 128 @param url: URL of the SVN repo 116 129 """ 117 if not os.path.isdir(install_dir): 118 os.mkdir(install_dir) 119 os.chdir(install_dir) 120 os.system("%s checkout -q %s" % (SVN, url)) 121 os.chdir(setup_dir) 122 os.system("%s setup.py -q build -cmingw32" % PYTHON) 123 os.system("%s setup.py -q install" % PYTHON) 130 logging.info("Installing %s" % url) 131 try: 132 if not os.path.isdir(install_dir): 133 os.mkdir(install_dir) 134 os.chdir(install_dir) 135 os.system("%s checkout -q %s" % (SVN, url)) 136 os.chdir(setup_dir) 137 if sys.platform == 'win32': 138 os.system("%s setup.py -q build -cmingw32" % PYTHON) 139 else: 140 os.system("%s setup.py -q build" % PYTHON) 141 os.system("%s setup.py -q install --root \"%s\"" % (PYTHON, LIB_FOLDER)) 142 except: 143 logging.error("Install failed for %s" % url) 144 logging.error(sys.exc_value) 145 raw_input("Press enter to continue\n") 146 sys.exit() 124 147 125 148 def checkout(release=False): … … 185 208 os.chdir(wd) 186 209 if release: 187 pass210 install_pkg(".", "Invariant-%s" % INVARIANT, INV_URL) 188 211 else: 189 212 install_pkg(".", "Invariant", "svn://danse.us/sans/trunk/Invariant") … … 191 214 os.chdir(wd) 192 215 if release: 193 pass216 install_pkg(".", "invariantview-%s" % INV_VIEW, INV_VIEW_URL) 194 217 else: 195 218 install_pkg(".", "invariantview", "svn://danse.us/sans/trunk/invariantview") … … 197 220 os.chdir(wd) 198 221 if release: 199 pass222 install_pkg(".", "calculatorview-%s" % CALC_VIEW, CALC_VIEW_URL) 200 223 else: 201 224 install_pkg(".", "calculatorview", "svn://danse.us/sans/trunk/calculatorview") … … 203 226 os.chdir(wd) 204 227 if release: 205 pass228 install_pkg(".", "calculator-%s" % CALCULATOR, CALC_URL) 206 229 else: 207 230 install_pkg(".", "calculator", "svn://danse.us/sans/trunk/calculator") … … 209 232 os.chdir(wd) 210 233 if release: 211 pass234 install_pkg(".", "theoryview-%s" % THEORY_VIEW, THEO_VIEW_URL) 212 235 else: 213 236 install_pkg(".", "theoryview", "svn://danse.us/sans/trunk/theoryview") 214 237 215 #TODO: need a release version of PARK 238 os.chdir(wd) 239 if release: 240 #install_pkg(".", "elements-%s" % ELEMENTS, ELEMENTS_URL) 241 install_pkg("elements", "trunk", "svn://danse.us/common/elements/trunk") 242 else: 243 install_pkg("elements", "trunk", "svn://danse.us/common/elements/trunk") 244 216 245 os.chdir(wd) 217 246 if release: … … 229 258 """ 230 259 Prepare the build 260 261 @param wipeout: If True, the DANSE modules in the standard site-packages will be 262 removed to avoid conflicts. 231 263 """ 232 264 # Remove existing libraries 233 265 if wipeout == True: 234 print "Deleting old modules"266 logging.info("Deleting DANSES modules in site-packages") 235 267 from distutils.sysconfig import get_python_lib 236 268 libdir = get_python_lib() … … 326 358 logging.info("Building installer from release version") 327 359 os.chdir("sansview-%s" % (SANSVIEW)) 328 os.system("%s setup_exe.py -q py2exe " % PYTHON)360 os.system("%s setup_exe.py -q py2exe --extrapath \"%s\python25\lib\site-packages\"" % (PYTHON, LIB_FOLDER)) 329 361 os.system("%s/Q installer.iss" % INNO) 330 362 shutil.copy2(os.path.join("Output","setupSansView.exe"), 331 363 os.path.join(CWD, "setupSansView_%s.exe" % str(timestamp))) 332 364 333 365 raw_input("Press enter to continue\n") 366
Note: See TracChangeset
for help on using the changeset viewer.