Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/sphinx-docs/build_sphinx.py

    ra728658 r354524d  
    3434# We are currently here: 
    3535#/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 
    3837SASMODELS_SOURCE_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model") 
    3938SASMODELS_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") 
    4239SASMODELS_DEST_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media") 
    4340SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media", "img") 
    4441 
    45 #if os.path.exists(SASMODELS_SOURCE_PROLOG): 
    46 #    print "Found models prolog folder at ", SASMODELS_SOURCE_PROLOG 
    47 #if os.path.exists(SASMODELS_SOURCE_REF_MODELS): 
    48 #    print "Found models ref folder at ", SASMODELS_SOURCE_REF_MODELS 
    4942#if os.path.exists(SASMODELS_SOURCE_MODELS): 
    5043#    print "Found models folder at ", SASMODELS_SOURCE_MODELS 
    5144#if os.path.exists(SASMODELS_SOURCE_IMG): 
    5245#    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_MODELS 
    5546#if os.path.exists(SASMODELS_DEST_MODELS): 
    5647#    print "Found models folder at ", SASMODELS_DEST_MODELS 
    5748#if os.path.exists(SASMODELS_DEST_IMG): 
    5849#    print "Found img folder at ", SASMODELS_DEST_IMG 
    59 #sys.exit() 
    6050 
    6151SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") 
     
    136126        if os.path.exists(SASMODELS_DEST_IMG): 
    137127            print "Found img  folder SASMODELS_DEST_IMG      at ", SASMODELS_DEST_IMG 
    138             print "Copying sasmodels model image files..." 
    139128            for files in os.listdir(SASMODELS_SOURCE_IMG): 
    140129                fromhere=os.path.join(SASMODELS_SOURCE_IMG,files) 
     
    142131                shutil.copy(fromhere,tohere) 
    143132 
    144     # And the rst prolog with the unit substitutions 
    145     if os.path.exists(SASMODELS_SOURCE_PROLOG): 
    146         print "Found prolog folder SASMODELS_SOURCE_PROLOG at ", SASMODELS_SOURCE_PROLOG 
    147         if os.path.exists(SASMODELS_DEST_PROLOG): 
    148             print "Found docs folder SASMODELS_DEST_PROLOG   at ", SASMODELS_DEST_PROLOG 
    149             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! 
    157133    # 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_MODELS 
    160 #        if os.path.exists(SASMODELS_DEST_REF_MODELS): 
    161 #            print "Found docs folder SASMODELS_DEST_REF_MODELS   at ", SASMODELS_DEST_REF_MODELS 
    162 #            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  
    169134    if os.path.exists(SASMODELS_SOURCE_MODELS): 
    170135        print "Found docs folder SASMODELS_SOURCE_MODELS at ", SASMODELS_SOURCE_MODELS 
    171136        if os.path.exists(SASMODELS_DEST_MODELS): 
    172137            print "Found docs folder SASMODELS_DEST_MODELS   at ", SASMODELS_DEST_MODELS 
    173             print "Copying sasmodels model files..." 
    174138            for files in os.listdir(SASMODELS_SOURCE_MODELS): 
    175139                if files.endswith(".rst"): 
Note: See TracChangeset for help on using the changeset viewer.