Changeset 4f82183 in sasview
- Timestamp:
- Aug 9, 2011 10:43:46 AM (13 years ago)
- 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:
- d075f58
- Parents:
- 05d444f
- Location:
- sansguiframe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/docs/sphinx/conf.py
r2d33e76 r4f82183 17 17 # add these directories to sys.path here. If the directory is relative to the 18 18 # documentation root, use os.path.abspath to make it absolute, like shown here. 19 sys.path.append(os.path.abspath(os.path.dirname('../../guiframe'))) 20 path = '../../guiframe/local_perspectives/plotting' 21 sys.path.append(os.path.abspath(os.path.dirname(path))) 19 sys.path.append(os.path.abspath(os.path.join('..', '..', 'src'))) 22 20 sys.path.append(os.path.abspath('_extensions')) 23 21 # -- General configuration ----------------------------------------------------- -
sansguiframe/docs/sphinx/genmods.py
r2d33e76 r4f82183 1 """ 2 This module generates .rst file for each python file under sans.guiframe. 3 Please run this file to autogenerate .rst files and build sphinx doc. 4 5 """ 6 7 8 9 1 10 from __future__ import with_statement 2 11 import os.path … … 39 48 40 49 def genfiles(package, package_name, modules, dir='api'): 50 """ 51 Generates .rst file for each python module under sans.guiframe 52 """ 41 53 42 54 if not os.path.exists(dir): … … 52 64 53 65 54 modules=[ 55 ('aboutbox', 'aboutbox'), 56 ('config', 'config'), 57 ('data_loader', 'data_loader'), 58 ('dataFitting', 'dataFitting'), 59 ('dummyapp', 'dummyapp'), 60 ('gui_manager', 'gui_manager'), 61 ('load_thread', 'load_thread'), 62 ('statusbar', 'statusbar'), 63 ('utils', 'utils'), 64 ('version', 'version'), 65 ] 66 package = 'sans.guiframe' 67 package_name='Reference' 66 def create_module_tuple(path): 67 """ 68 Create tuples of module and module name 69 :param path: path of the a package directory 70 """ 71 modules = [] 72 list = os.listdir(path) 73 for item in list: 74 toks = os.path.splitext(os.path.basename(item)) 75 if toks[1] == '.py' and toks[0] not in ["__init__"]: 76 exec "module = ('%s', '%s')"%(toks[0], toks[0]) 77 modules.append(module) 78 return modules 68 79 69 80 if __name__ == "__main__": 81 82 path = os.path.join('..', '..', 'src', 'sans', 'guiframe') 83 modules = create_module_tuple(path) 84 package = 'sans.guiframe' 85 package_name = 'Reference' 70 86 genfiles(package, package_name, modules, dir='api') 71 72 modules=[ 73 ('AnnulusSlicer', 'AnnulusSlicer'), 74 ('Arc', 'Arc'), 75 ('AzimutSlicer', 'AzimutSlicer'), 76 ('BaseInteractor', 'BaseInteractor'), 77 ('binder', 'binder'), 78 ('boxMask', 'boxMask'), 79 ('boxSlicer', 'boxSlicer'), 80 ('boxSum', 'boxSum'), 81 ('detector_dialog', 'detector_dialog'), 82 ('Edge', 'Edge'), 83 ('masking', 'masking'), 84 ('Plotter1D', 'Plotter1D'), 85 ('Plotter2D', 'Plotter2D'), 86 ('plotting', 'plotting'), 87 ('sectorMask', 'sectorMask'), 88 ('SectorSlicer', 'SectorSlicer'), 89 ('slicerpanel', 'slicerpanel'), 90 ('SlicerParameters', 'SlicerParameters'), 91 ] 92 package = 'sans.guiframe.local_perspectives.plotting' 93 package_name = 'Local Perspective: Plotting' 94 genfiles(package, package_name, modules, dir='api/local_perspectives/plotting') 87 # build local plugin 88 for f in os.listdir(path): 89 if os.path.isdir(os.path.join(path, f)) and not f.startswith('.') \ 90 and f not in ['images', 'media']: 91 if f == "local_perspectives": 92 temp = os.path.join(path, f) 93 if os.path.isdir(temp): 94 for tf in os.listdir(temp): 95 if os.path.isdir(os.path.join(path, f, tf)) \ 96 and not tf.startswith('.') : 97 package = "sans.guiframe" 98 package += ".local_perspectives.%s" % str(tf) 99 p = os.path.join(path, f, tf) 100 package_name = 'Local Perspective: %s' % str(tf) 101 modules = create_module_tuple(p) 102 dir = os.path.join("api", "local_perspectives", tf) 103 genfiles(package, package_name, modules, dir=dir) 104 95 105 print "Sphinx: generate .rst files complete..." 96 106 -
sansguiframe/docs/sphinx/index.rst
r2d33e76 r4f82183 14 14 api/index.rst 15 15 api/local_perspectives/plotting/index.rst 16 api/local_perspectives/data_loader/index.rst 16 17 17 18 Indices and tables -
sansguiframe/src/setup.py
r2ec6228 r4f82183 1 1 2 2 """ 3 3 Installs the guiframe package 4 4 """ 5 5 6 7 from distutils.core import setup, Extension 6 from distutils.core import setup 7 import os 8 8 9 from distutils.sysconfig import get_python_lib 10 import os 11 import sys 9 path = os.path.join(os.getcwd(), "sans", "guiframe",'local_perspectives') 10 package_dir = {"sans.guiframe":os.path.join("sans", "guiframe"), 11 "sans.guiframe.local_perspectives":os.path.join("sans", 12 "guiframe", 13 "local_perspectives"),} 12 14 13 14 15 path = os.path.join(os.getcwd(), 'local_perspectives')16 package_dir = { "sans.guiframe":".",17 "sans.guiframe.local_perspectives":"local_perspectives",18 #"sans.guiframe.images":"images",19 # "sans.guiframe.media":"media",20 }21 #package_data = {"sans.guiframe": ['images/*'],22 # "sans.guiframe":'media/*']}23 15 package_data = {"sans.guiframe": ['images/*', 'media/*']} 24 16 packages = ["sans.guiframe", … … 29 21 package_name = "sans.guiframe.local_perspectives." + dir 30 22 packages.append(package_name) 31 package_dir[package_name] = "local_perspectives/" + dir 23 package_dir[package_name] = os.path.join("sans", 24 "guiframe", 25 "local_perspectives" , dir) 32 26 33 27 34 28 setup( 35 name=" guiframe",29 name="sans.guiframe", 36 30 version = "0.9.1", 37 31 description = "Python module for SANS gui framework", 38 32 author = "University of Tennessee", 39 33 url = "http://danse.chem.utk.edu", 40 41 34 package_dir = package_dir, 42 43 35 packages = packages, 44 36 package_data = package_data, 45 46 37 )
Note: See TracChangeset
for help on using the changeset viewer.