- Timestamp:
- Sep 6, 2018 3:56:56 AM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- e6d309c
- Parents:
- 5d43213 (diff), 170b251 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Steve K <smk78@…> (09/06/18 03:56:56)
- git-committer:
- GitHub <noreply@…> (09/06/18 03:56:56)
- Location:
- docs/sphinx-docs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/build_sphinx.py
rdf72475 r153b75a 8 8 from __future__ import print_function 9 9 10 import s ubprocess10 import sys 11 11 import os 12 12 from os.path import join as joinpath, abspath, dirname, isdir, exists, relpath 13 import sys14 import fnmatch15 13 import shutil 14 import subprocess 16 15 import imp 17 18 16 from glob import glob 19 17 from distutils.dir_util import copy_tree … … 21 19 from distutils.spawn import find_executable 22 20 23 from shutil import copy 24 from os import listdir 25 26 platform = '.%s-%s'%(get_platform(),sys.version[:3]) 21 PLATFORM = '.%s-%s'%(get_platform(), sys.version[:3]) 27 22 28 23 # sphinx paths … … 35 30 SASVIEW_ROOT = joinpath(SPHINX_ROOT, '..', '..') 36 31 SASVIEW_DOCS = joinpath(SPHINX_ROOT, "source") 37 SASVIEW_BUILD = abspath(joinpath(SASVIEW_ROOT, "build", "lib"+ platform))32 SASVIEW_BUILD = abspath(joinpath(SASVIEW_ROOT, "build", "lib"+PLATFORM)) 38 33 SASVIEW_MEDIA_SOURCE = joinpath(SASVIEW_ROOT, "src", "sas") 39 34 SASVIEW_DOC_TARGET = joinpath(SASVIEW_BUILD, "doc") … … 65 60 66 61 def inplace_change(filename, old_string, new_string): 67 # Thanks to http://stackoverflow.com/questions/4128144/replace-string-within-file-contents 68 s=open(filename).read() 69 if old_string in s: 70 print('Changing "{old_string}" to "{new_string}"'.format(**locals())) 71 s=s.replace(old_string, new_string) 72 f=open(filename, 'w') 73 f.write(s) 74 f.flush() 75 f.close() 76 else: 77 print('No occurences of "{old_string}" found.'.format(**locals())) 62 # Thanks to http://stackoverflow.com/questions/4128144/replace-string-within-file-contents 63 s = open(filename).read() 64 if old_string in s: 65 print('Changing "{old_string}" to "{new_string}"'.format(**locals())) 66 s = s.replace(old_string, new_string) 67 with open(filename, 'w') as f: 68 f.write(s) 69 else: 70 print('No occurences of "{old_string}" found.'.format(**locals())) 78 71 79 72 def _remove_dir(dir_path): … … 241 234 finally: 242 235 fd_in.close() 243 with ZipFile(cache_path) as zip:244 zip.extractall(destination)236 with ZipFile(cache_path) as archive: 237 archive.extractall(destination) 245 238 246 239 def convert_katex(): -
docs/sphinx-docs/source/conf.py
ra8bbba2 r153b75a 11 11 # All configuration values have a default; values that are commented out 12 12 # serve to show the default. 13 from __future__ import print_function 13 14 14 15 import sys, os, collections … … 22 23 sys.path.insert(0, build_lib) 23 24 sys.path.insert(0, os.path.abspath('_extensions')) # for sphinx extensions 24 print "-- path --"25 print "\n".join(sys.path)25 print("-- path --") 26 print("\n".join(sys.path)) 26 27 27 28 # -- General configuration ----------------------------------------------------- -
docs/sphinx-docs/source/rst_prolog
r1659f54 r153b75a 1 .. TODO: This file is ignored! Prolog comes from sasmodels/doc/rst_prolog. 2 1 3 .. Set up some substitutions to make life easier... 2 4
Note: See TracChangeset
for help on using the changeset viewer.