Changeset b7a2ebfd in sasview for docs


Ignore:
Timestamp:
Mar 18, 2016 7:11:12 PM (9 years ago)
Author:
smk78
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:
34e0c32
Parents:
45dfa47e
Message:

With proto-copy of sasmodels docs for integration

File:
1 edited

Legend:

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

    rd2143ab rb7a2ebfd  
    1717from distutils.util import get_platform 
    1818from shutil import copy 
     19from os import listdir 
    1920 
    2021platform = '.%s-%s'%(get_platform(),sys.version[:3]) 
     
    3738SASMODELS_SOURCE_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "sasmodels", "models", "img") 
    3839SASMODELS_DEST_MODELS = os.path.join(SASVIEW_SRC, "sas", "models", "media") 
    39 SASMODELS_DEST_IMG = os.path.join(SASVIEW_SRC, "sas", "models", "media", "img") 
    40  
    41 #print SASMODELS_SOURCE_MODELS 
    42 #print SASMODELS_SOURCE_IMG 
    43 #print SASMODELS_DEST_MODELS 
    44 #print SASMODELS_DEST_IMG 
     40SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media", "img") 
     41 
     42#if os.path.exists(SASMODELS_SOURCE_MODELS): 
     43#    print "Found models folder at ", SASMODELS_SOURCE_MODELS 
     44#if os.path.exists(SASMODELS_SOURCE_IMG): 
     45#    print "Found img folder at ", SASMODELS_SOURCE_IMG 
     46#if os.path.exists(SASMODELS_DEST_MODELS): 
     47#    print "Found models folder at ", SASMODELS_DEST_MODELS 
     48#if os.path.exists(SASMODELS_DEST_IMG): 
     49#    print "Found img folder at ", SASMODELS_DEST_IMG 
    4550 
    4651SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") 
     
    114119        
    115120    # Make sure we have the relevant images for the new sasmodels documentation 
    116 #    for filename in glob.glob(os.path.join('C:\Code\sasmodels\sasmodels\models\img', '*.*')): 
    117 #        shutil.copy(filename, 'c:/code/sasview-local-trunk/src/sas/models/media') 
    118  
    119 #    sys.exit() 
     121    if os.path.exists(SASMODELS_SOURCE_IMG): 
     122        print "Found img  folder SASMODELS_SOURCE_IMG    at ", SASMODELS_SOURCE_IMG 
     123        if os.path.exists(SASMODELS_DEST_IMG): 
     124            print "Found img  folder SASMODELS_DEST_IMG      at ", SASMODELS_DEST_IMG 
     125            for files in os.listdir(SASMODELS_SOURCE_IMG): 
     126                fromhere=os.path.join(SASMODELS_SOURCE_IMG,files) 
     127                tohere=os.path.join(SASMODELS_DEST_IMG,files) 
     128                shutil.copy(fromhere,tohere) 
     129 
     130    # And the relevant .py files with the rst descriptions for the new sasmodels documentation 
     131    if os.path.exists(SASMODELS_SOURCE_MODELS): 
     132        print "Found docs folder SASMODELS_SOURCE_MODELS at ", SASMODELS_SOURCE_MODELS 
     133        if os.path.exists(SASMODELS_DEST_MODELS): 
     134            print "Found docs folder SASMODELS_DEST_MODELS   at ", SASMODELS_DEST_MODELS 
     135            for files in os.listdir(SASMODELS_SOURCE_MODELS): 
     136                if files.endswith(".py"): 
     137                    fromhere=os.path.join(SASMODELS_SOURCE_MODELS,files) 
     138                    tohere=os.path.join(SASMODELS_DEST_MODELS,files) 
     139                    shutil.copy(fromhere,tohere) 
    120140 
    121141 
Note: See TracChangeset for help on using the changeset viewer.