Changeset 8359bbf7 in sasview


Ignore:
Timestamp:
Sep 15, 2016 8:33:57 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
4762f09
Parents:
f74bd6e
git-author:
wpotrzebowski <Wojciech.Potrzebowski@…> (08/17/16 04:49:57)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
Message:

Sphinx build adds mag_img folder

File:
1 edited

Legend:

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

    r1de6300 r8359bbf7  
    3636SASMODELS_SOURCE_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc") 
    3737SASMODELS_SOURCE_MAGNETISM = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "magnetism") 
     38SASMODELS_SOURCE_MAGIMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "magnetism", "mag_img") 
    3839SASMODELS_SOURCE_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "models") 
    3940SASMODELS_SOURCE_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model") 
     
    4445SASMODELS_DEST_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user", "models") 
    4546SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR,  "source", "user", "model-imgs", "new-models") 
     47SASMODELS_DEST_MAGIMG = os.path.join(CURRENT_SCRIPT_DIR,  "source", "user", "mag_img") 
    4648SASMODELS_DEST_BUILDIMG = os.path.join(CURRENT_SCRIPT_DIR,  "source", "user", "models", "img") 
    4749 
     
    137139 
    138140            copy_tree(docs, dest_dir) 
    139              
     141 
    140142    # Now pickup testdata_help.rst 
    141143#    print os.path.abspath(SASVIEW_TEST) 
     
    144146    if os.path.exists(SASVIEW_TEST): 
    145147       print "Found docs folder at ", SASVIEW_TEST 
    146        shutil.copytree(SASVIEW_TEST, SPHINX_SOURCE_TEST)        
    147  
    148     print "=== And the Sasmodels Docs ==="  
     148       shutil.copytree(SASVIEW_TEST, SPHINX_SOURCE_TEST) 
     149 
     150    print "=== And the Sasmodels Docs ===" 
    149151    # Make sure we have the relevant images for the new sasmodels documentation 
    150152    # First(!) we'll make a local reference copy for SasView (/new-models will be cleaned each build) 
     
    175177            shutil.copy(fromhere,tohere) 
    176178        else: print "no source directorty",SASMODELS_SOURCE_AUTOIMG ,"was found" 
    177      
     179 
    178180    # And the rst prolog with the unit substitutions 
    179181    if os.path.exists(SASMODELS_SOURCE_PROLOG): 
     
    198200                    tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files) 
    199201                    shutil.copy(fromhere,tohere) 
     202 
     203    if os.path.exists(SASMODELS_SOURCE_MAGIMG): 
     204        print "Found img  folder SASMODELS_SOURCE_MAGIMG    at ", SASMODELS_SOURCE_MAGIMG 
     205        if not os.path.exists(SASMODELS_DEST_MAGIMG): 
     206            print "Missing docs folder SASMODELS_DEST_MAGIMG at ", SASMODELS_DEST_MAGIMG 
     207            os.makedirs(SASMODELS_DEST_MAGIMG) 
     208            print "created SASMODELS_DEST_MAGIMG at ", SASMODELS_DEST_MAGIMG 
     209        print "Copying sasmodels model auto-generated image files..." 
     210        for files in os.listdir(SASMODELS_SOURCE_MAGIMG): 
     211            fromhere=os.path.join(SASMODELS_SOURCE_MAGIMG,files) 
     212            tohere=os.path.join(SASMODELS_DEST_MAGIMG,files) 
     213            shutil.copy(fromhere,tohere) 
     214        else: print "no source directorty",SASMODELS_SOURCE_MAGIMG ,"was found" 
    200215 
    201216    if os.path.exists(SASMODELS_SOURCE_REF_MODELS): 
Note: See TracChangeset for help on using the changeset viewer.