Changeset 21bba86 in sasview for docs/sphinx-docs/build_sphinx.py
- Timestamp:
- Apr 11, 2017 5:51:01 AM (8 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 01f1e17
- Parents:
- f4d571b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/build_sphinx.py
rf4d571b r21bba86 12 12 import shutil 13 13 import imp 14 from __future__ import print_function 15 14 16 from glob import glob 15 16 17 from distutils.dir_util import copy_tree 17 18 from distutils.util import get_platform … … 55 56 SASMODELS_DEST_BUILDIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "models", "img") 56 57 57 #if os.path.exists(SASMODELS_SOURCE_PROLOG):58 # print "Found models prolog folder at", SASMODELS_SOURCE_PROLOG59 #if os.path.exists(SASMODELS_SOURCE_REF_MODELS):60 # print "Found models ref folder at", SASMODELS_SOURCE_REF_MODELS61 #if os.path.exists(SASMODELS_SOURCE_MODELS):62 # print "Found models folder at", SASMODELS_SOURCE_MODELS63 #if os.path.exists(SASMODELS_SOURCE_IMG):64 # print "Found img folder at", SASMODELS_SOURCE_IMG65 #if os.path.exists(SASMODELS_DEST_REF_MODELS):66 # print "Found models ref folder at", SASMODELS_DEST_REF_MODELS67 #if os.path.exists(SASMODELS_DEST_MODELS):68 # print "Found models folder at", SASMODELS_DEST_MODELS69 #if os.path.exists(SASMODELS_DEST_IMG):70 # print "Found img folder at", SASMODELS_DEST_IMG71 #sys.exit()72 58 73 59 SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") … … 88 74 s=open(filename).read() 89 75 if old_string in s: 90 print 'Changing "{old_string}" to "{new_string}"'.format(**locals())76 print('Changing "{old_string}" to "{new_string}"'.format(**locals())) 91 77 s=s.replace(old_string, new_string) 92 78 f=open(filename, 'w') … … 95 81 f.close() 96 82 else: 97 print 'No occurences of "{old_string}" found.'.format(**locals())83 print('No occurences of "{old_string}" found.'.format(**locals())) 98 84 99 85 def _remove_dir(dir_path): 100 86 """Removes the given directory.""" 101 87 if os.path.isdir(dir_path): 102 print "Removing \"%s\"... " % dir_path88 print("Removing \"%s\"... " % dir_path) 103 89 shutil.rmtree(dir_path) 104 90 … … 208 194 shutil.copy(fromhere,tohere) 209 195 else: 210 print "no source directory",SASMODELS_SOURCE_PROLOG, "was found"196 print("no source directory",SASMODELS_SOURCE_PROLOG, "was found") 211 197 212 198 if os.path.exists(SASMODELS_SOURCE_GPU):
Note: See TracChangeset
for help on using the changeset viewer.