Changes in docs/sphinx-docs/build_sphinx.py [a728658:354524d] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/build_sphinx.py
ra728658 r354524d 34 34 # We are currently here: 35 35 #/sasview-local-trunk/docs/sphinx-docs/build_sphinx.py 36 SASMODELS_SOURCE_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc") 37 #SASMODELS_SOURCE_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "models") 36 38 37 SASMODELS_SOURCE_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model") 39 38 SASMODELS_SOURCE_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model", "img") 40 SASMODELS_DEST_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "source")41 SASMODELS_DEST_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user")42 39 SASMODELS_DEST_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media") 43 40 SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media", "img") 44 41 45 #if os.path.exists(SASMODELS_SOURCE_PROLOG):46 # print "Found models prolog folder at ", SASMODELS_SOURCE_PROLOG47 #if os.path.exists(SASMODELS_SOURCE_REF_MODELS):48 # print "Found models ref folder at ", SASMODELS_SOURCE_REF_MODELS49 42 #if os.path.exists(SASMODELS_SOURCE_MODELS): 50 43 # print "Found models folder at ", SASMODELS_SOURCE_MODELS 51 44 #if os.path.exists(SASMODELS_SOURCE_IMG): 52 45 # print "Found img folder at ", SASMODELS_SOURCE_IMG 53 #if os.path.exists(SASMODELS_DEST_REF_MODELS):54 # print "Found models ref folder at ", SASMODELS_DEST_REF_MODELS55 46 #if os.path.exists(SASMODELS_DEST_MODELS): 56 47 # print "Found models folder at ", SASMODELS_DEST_MODELS 57 48 #if os.path.exists(SASMODELS_DEST_IMG): 58 49 # print "Found img folder at ", SASMODELS_DEST_IMG 59 #sys.exit()60 50 61 51 SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") … … 136 126 if os.path.exists(SASMODELS_DEST_IMG): 137 127 print "Found img folder SASMODELS_DEST_IMG at ", SASMODELS_DEST_IMG 138 print "Copying sasmodels model image files..."139 128 for files in os.listdir(SASMODELS_SOURCE_IMG): 140 129 fromhere=os.path.join(SASMODELS_SOURCE_IMG,files) … … 142 131 shutil.copy(fromhere,tohere) 143 132 144 # And the rst prolog with the unit substitutions145 if os.path.exists(SASMODELS_SOURCE_PROLOG):146 print "Found prolog folder SASMODELS_SOURCE_PROLOG at ", SASMODELS_SOURCE_PROLOG147 if os.path.exists(SASMODELS_DEST_PROLOG):148 print "Found docs folder SASMODELS_DEST_PROLOG at ", SASMODELS_DEST_PROLOG149 print "Copying sasmodels rst_prolog file..."150 for files in os.listdir(SASMODELS_SOURCE_PROLOG):151 if files.startswith("rst"):152 fromhere=os.path.join(SASMODELS_SOURCE_PROLOG,files)153 tohere=os.path.join(SASMODELS_DEST_PROLOG,files)154 shutil.copy(fromhere,tohere)155 156 # ACTUALLY IT TURNED OUT WE NEED TO EDIT THE TOCTREES SO THIS COPY WASN'T USEFUL IN THE END!157 133 # And the relevant rst descriptions for the new sasmodels documentation 158 # if os.path.exists(SASMODELS_SOURCE_REF_MODELS):159 # print "Found docs folder SASMODELS_SOURCE_REF_MODELS at ", SASMODELS_SOURCE_REF_MODELS160 # if os.path.exists(SASMODELS_DEST_REF_MODELS):161 # print "Found docs folder SASMODELS_DEST_REF_MODELS at ", SASMODELS_DEST_REF_MODELS162 # print "Copying sasmodels model toctree files..."163 # for files in os.listdir(SASMODELS_SOURCE_REF_MODELS):164 # if files.endswith(".rst"):165 # fromhere=os.path.join(SASMODELS_SOURCE_REF_MODELS,files)166 # tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files)167 # shutil.copy(fromhere,tohere)168 169 134 if os.path.exists(SASMODELS_SOURCE_MODELS): 170 135 print "Found docs folder SASMODELS_SOURCE_MODELS at ", SASMODELS_SOURCE_MODELS 171 136 if os.path.exists(SASMODELS_DEST_MODELS): 172 137 print "Found docs folder SASMODELS_DEST_MODELS at ", SASMODELS_DEST_MODELS 173 print "Copying sasmodels model files..."174 138 for files in os.listdir(SASMODELS_SOURCE_MODELS): 175 139 if files.endswith(".rst"):
Note: See TracChangeset
for help on using the changeset viewer.