Changeset 115eb7e in sasview


Ignore:
Timestamp:
Apr 10, 2017 7:49:59 AM (8 years ago)
Author:
ajj
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:
6c7e4cc1
Parents:
d26f025
Message:

Added warnings to build_sphix about missing directories.

Initial work to run sasmodels build from sasview setup.py

Files:
2 edited

Legend:

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

    r751f4bd r115eb7e  
    206206                    tohere=os.path.join(SASMODELS_DEST_PROLOG,files) 
    207207                    shutil.copy(fromhere,tohere) 
     208    else: print "no source directory",SASMODELS_SOURCE_PROLOG, "was found" 
    208209 
    209210    if os.path.exists(SASMODELS_SOURCE_GPU): 
     
    217218                    tohere=os.path.join(SPHINX_SOURCE_USER,files) 
    218219                    shutil.copy(fromhere,tohere) 
     220    else: print "no source directory",SASMODELS_SOURCE_GPU," was found" 
    219221 
    220222    if os.path.exists(SASMODELS_SOURCE_SESANS): 
     
    228230                    tohere=os.path.join(SPHINX_SOURCE_USER,files) 
    229231                    shutil.copy(fromhere,tohere) 
     232    else: print "no source directory",SASMODELS_SOURCE_SESANS," was found" 
    230233 
    231234    if os.path.exists(SASMODELS_SOURCE_MAGNETISM): 
     
    239242                    tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files) 
    240243                    shutil.copy(fromhere,tohere) 
     244    else: print "no source directory",SASMODELS_SOURCE_MAGNETISM," was found" 
    241245 
    242246    if os.path.exists(SASMODELS_SOURCE_MAGIMG): 
     
    276280                    tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files) 
    277281                    shutil.copy(fromhere,tohere) 
    278     # But need to change the path to the model docs in the tocs 
    279     for files in os.listdir(SASMODELS_DEST_REF_MODELS): 
    280 #        print files 
    281         if files.startswith("shape"): 
    282             print "Changing toc paths in", files 
    283             inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
    284         if files.startswith("sphere"): 
    285             print "Changing toc paths in", files 
    286             inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
    287         if files.startswith("custom"): 
    288             print "Changing toc paths in", files 
    289             inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
    290         if files.startswith("structure"): 
    291             print "Changing toc paths in", files 
    292             inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
     282            # But need to change the path to the model docs in the tocs 
     283            for files in os.listdir(SASMODELS_DEST_REF_MODELS): 
     284        #        print files 
     285                if files.startswith("shape"): 
     286                    print "Changing toc paths in", files 
     287                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
     288                if files.startswith("sphere"): 
     289                    print "Changing toc paths in", files 
     290                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
     291                if files.startswith("custom"): 
     292                    print "Changing toc paths in", files 
     293                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
     294                if files.startswith("structure"): 
     295                    print "Changing toc paths in", files 
     296                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/") 
     297    else: print "no source directory",SASMODELS_SOURCE_REF_MODELS," was found" 
    293298 
    294299    if os.path.exists(SASMODELS_SOURCE_MODELS): 
     
    320325                tohere=os.path.join(SASMODELS_DEST_BUILDIMG,files) 
    321326                shutil.copy(fromhere,tohere) 
     327    else: print "no source directory",SASMODELS_SOURCE_MODELS," was found.\n !!!!NO MODEL DOCS WILL BE BUILT!!!!" 
    322328 
    323329 
  • setup.py

    rf3bf622 r115eb7e  
    152152 
    153153    def run(self): 
     154        ''' First builds the sasmodels documentation if the directory 
     155        is present. Then builds the sasview docs. 
     156        ''' 
     157        ### AJJ - Add code for building sasmodels docs here: 
     158        # check for doc path 
     159        SASMODELS_PATH = '../sasmodels' 
     160        if os.path.exists(SASMODELS_PATH): 
     161            if os.path.isdir(SASMODELS_PATH): 
     162                # if available, build sasmodels docs 
     163            else: 
     164                # if not available warning message 
     165                print "WARNING!! sasmodels directory not found. Cannot build model docs." 
     166 
     167        #Now build sasview (+sasmodels) docs 
    154168        sys.path.append("docs/sphinx-docs") 
    155169        import build_sphinx 
Note: See TracChangeset for help on using the changeset viewer.