- Timestamp:
- May 3, 2010 10:28:58 AM (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:
- ee370db
- Parents:
- 481ad37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/build_sansview.py
r5353e1c rdb7b92e 16 16 # 17 17 # - mingw must be installed 18 # 19 # On Mac: 20 # - Macholib must be installed to use py2app 18 21 # 19 22 # Usage: … … 35 38 timestamp = int(time.time()) 36 39 CWD = os.getcwd() 37 38 40 INSTALL_FOLDER = "install_%s" % str(timestamp) 39 LIB_FOLDER = "%s\%s" % (CWD, INSTALL_FOLDER) 41 42 # On Windows, the python executable is not always on the path. 43 # Use its most frequent location as the default. 44 if sys.platform == 'win32': 45 PYTHON = "c:\python25\python" 46 LIB_FOLDER = "%s/%s" % (CWD, INSTALL_FOLDER) 47 else: 48 PYTHON = 'python' 40 49 41 50 logging.basicConfig(level=logging.INFO, … … 43 52 filename='build_%s.log' % str(timestamp), 44 53 filemode='w') 45 46 47 # On Windows, the python executable is not always on the path.48 # Use its most frequent location as the default.49 if sys.platform == 'win32':50 PYTHON = "c:\python25\python"51 else:52 PYTHON = 'python'53 54 54 55 SVN = "svn" … … 137 138 if sys.platform == 'win32': 138 139 os.system("%s setup.py -q build -cmingw32" % PYTHON) 140 os.system("%s setup.py -q install --root \"%s\"" % (PYTHON, LIB_FOLDER)) 139 141 else: 140 os.system("%s setup.py -qbuild" % PYTHON)141 os.system("%s setup.py -q install --root \"%s\"" % (PYTHON, LIB_FOLDER))142 os.system("%s setup.py build" % PYTHON) 143 os.system("%s setup.py install --prefix ~/.local" % PYTHON) 142 144 except: 143 145 logging.error("Install failed for %s" % url) … … 154 156 os.chdir(wd) 155 157 if release: 158 install_pkg(".", "DataLoader-%s" % DATALOADER, DATALOADER_URL) 159 else: 160 install_pkg(".", "DataLoader", "svn://danse.us/sans/trunk/DataLoader") 161 162 os.chdir(wd) 163 if release: 156 164 install_pkg(".", "sansmodels-%s/src" % SANSMODELS, SANSMODELS_URL) 157 165 else: 158 166 install_pkg(".", "sansmodels/src", "svn://danse.us/sans/trunk/sansmodels") 159 160 os.chdir(wd)161 if release:162 install_pkg(".", "DataLoader-%s" % DATALOADER, DATALOADER_URL)163 else:164 install_pkg(".", "DataLoader", "svn://danse.us/sans/trunk/DataLoader")165 167 166 168 os.chdir(wd) … … 355 357 checkout(True) 356 358 if sys.platform=='win32': 357 logging.info("Building installer from release version")359 logging.info("Building Windows installer from release version") 358 360 os.chdir("sansview-%s" % (SANSVIEW)) 359 os.system("%s setup_exe.py -qpy2exe --extrapath \"%s\python25\lib\site-packages\"" % (PYTHON, LIB_FOLDER))361 os.system("%s setup_exe.py py2exe --extrapath \"%s\python25\lib\site-packages\"" % (PYTHON, LIB_FOLDER)) 360 362 os.system("%s/Q installer.iss" % INNO) 361 363 shutil.copy2(os.path.join("Output","setupSansView.exe"), 362 364 os.path.join(CWD, "setupSansView_%s.exe" % str(timestamp))) 363 365 elif sys.platform=='darwin': 364 #TODO: bundle a Mac app 365 pass 366 logging.info("Building Mac application from release version") 367 os.chdir("sansview-%s" % (SANSVIEW)) 368 os.system("%s setup_mac.py py2app" % PYTHON) 366 369 367 370 raw_input("Press enter to continue\n")
Note: See TracChangeset
for help on using the changeset viewer.