- Timestamp:
- Mar 21, 2016 2:03:30 PM (9 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:
- 5a71761
- Parents:
- 9274711
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/build_sphinx.py
rf603bec r5420ef6 38 38 SASMODELS_SOURCE_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model") 39 39 SASMODELS_SOURCE_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model", "img") 40 SASMODELS_SOURCE_AUTOIMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "_build", "html","_images") 40 41 SASMODELS_DEST_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "source") 41 42 SASMODELS_DEST_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user") 42 43 SASMODELS_DEST_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user", "models") 43 44 SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR, "source", "user", "model-imgs", "new-models") 45 SASMODELS_DEST_BUILDIMG = os.path.join(CURRENT_SCRIPT_DIR, "source", "user", "models", "img") 44 46 45 47 #if os.path.exists(SASMODELS_SOURCE_PROLOG): … … 145 147 print "=== And the Sasmodels Docs ===" 146 148 # Make sure we have the relevant images for the new sasmodels documentation 149 # First(!) we'll make a local reference copy for SasView (/new-models will be cleaned each build) 147 150 if os.path.exists(SASMODELS_SOURCE_IMG): 148 151 print "Found img folder SASMODELS_SOURCE_IMG at ", SASMODELS_SOURCE_IMG … … 155 158 shutil.copy(fromhere,tohere) 156 159 160 if os.path.exists(SASMODELS_SOURCE_AUTOIMG): 161 print "Found img folder SASMODELS_SOURCE_AUTOIMG at ", SASMODELS_SOURCE_AUTOIMG 162 if os.path.exists(SASMODELS_DEST_IMG): 163 print "Copying sasmodels model auto-generated image files..." 164 for files in os.listdir(SASMODELS_SOURCE_AUTOIMG): 165 fromhere=os.path.join(SASMODELS_SOURCE_AUTOIMG,files) 166 tohere=os.path.join(SASMODELS_DEST_IMG,files) 167 shutil.copy(fromhere,tohere) 168 157 169 # And the rst prolog with the unit substitutions 158 170 if os.path.exists(SASMODELS_SOURCE_PROLOG): … … 203 215 tohere=os.path.join(SASMODELS_DEST_MODELS,files) 204 216 shutil.copy(fromhere,tohere) 217 else: 218 print "Missing docs folder SASMODELS_DEST_MODELS at ", SASMODELS_DEST_MODELS 219 os.makedirs(SASMODELS_DEST_MODELS) 220 if not os.path.exists(SASMODELS_DEST_BUILDIMG): 221 os.makedirs(SASMODELS_DEST_BUILDIMG) 222 print "Created docs folder SASMODELS_DEST_MODELS at ", SASMODELS_DEST_MODELS 223 print "Copying model files for build..." 224 for files in os.listdir(SASMODELS_SOURCE_MODELS): 225 if files.endswith(".rst"): 226 fromhere=os.path.join(SASMODELS_SOURCE_MODELS,files) 227 tohere=os.path.join(SASMODELS_DEST_MODELS,files) 228 shutil.copy(fromhere,tohere) 229 # No choice but to do this because model files are all coded for images in /models/img 230 print "Copying image files for build..." 231 for files in os.listdir(SASMODELS_DEST_IMG): 232 fromhere=os.path.join(SASMODELS_DEST_IMG,files) 233 tohere=os.path.join(SASMODELS_DEST_BUILDIMG,files) 234 shutil.copy(fromhere,tohere) 205 235 206 236
Note: See TracChangeset
for help on using the changeset viewer.