[pygccxml-commit] SF.net SVN: pygccxml:[1633]
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2009-01-28 20:09:00
|
Revision: 1633 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1633&view=rev Author: roman_yakovenko Date: 2009-01-28 20:08:58 +0000 (Wed, 28 Jan 2009) Log Message: ----------- sphinx - small changes Modified Paths: -------------- pydsc_dev/pydsc.py sphinx/conf.py Removed Paths: ------------- sphinx/Makefile Property Changed: ---------------- sphinx/ Modified: pydsc_dev/pydsc.py =================================================================== --- pydsc_dev/pydsc.py 2009-01-28 18:25:43 UTC (rev 1632) +++ pydsc_dev/pydsc.py 2009-01-28 20:08:58 UTC (rev 1633) @@ -38,14 +38,20 @@ """ class FILTER_TYPE: - """defines few filter constants""" + """ + defines few filter constants + + - *INCLUDE* + - *EXCLUDE* + """ INCLUDE = 'include' EXCLUDE = 'exclude' def __init__( self, what, ftype ): """ - what - list of paths, could contain file and directory names - ftype - FILTER_TYPE constant + :parameters: + - `what` - could be file or directory name, or list of them + - `ftype` - one of the :const:`FILTER_TYPE` constants """ self.what = what if None is self.what: @@ -58,9 +64,10 @@ @staticmethod def contains_parent_dir( path, dirs ): """ - returns true if one of the directories is root directory for the path, - false otherwise - + returns true if one of the directories is root directory for the `path`, false otherwise + + :parameters: + - `path` - a path @param path: path @type path: str @@ -219,8 +226,9 @@ """documentation spell checker instance""" doc_checker = None -if 'sphinx' not in os.environ['PYDSC']: - doc_checker = checker_t( checker.SpellChecker( "en_US" ) ) +if 'PYDSC' in os.environ: + if not 'sphinx' in os.environ['PYDSC']: + doc_checker = checker_t( checker.SpellChecker( "en_US" ) ) def exclude( what ): """ Property changes on: sphinx ___________________________________________________________________ Modified: svn:ignore - __build pydsc pygccxml pyplusplus + __build pydsc pygccxml pyplusplus index.rest Deleted: sphinx/Makefile =================================================================== --- sphinx/Makefile 2009-01-28 18:25:43 UTC (rev 1632) +++ sphinx/Makefile 2009-01-28 20:08:58 UTC (rev 1633) @@ -1,75 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d __build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html web pickle htmlhelp latex changes linkcheck - -help: - @echo "Please use \`make <target>' where <target> is one of" - @echo " html to make standalone HTML files" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview over all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - -clean: - -rm -rf __build/* - -html: - mkdir -p __build/html __build/doctrees - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) __build/html - @echo - @echo "Build finished. The HTML pages are in __build/html." - -pickle: - mkdir -p __build/pickle __build/doctrees - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) __build/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -web: pickle - -json: - mkdir -p __build/json __build/doctrees - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) __build/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - mkdir -p __build/htmlhelp __build/doctrees - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) __build/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in __build/htmlhelp." - -latex: - mkdir -p __build/latex __build/doctrees - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) __build/latex - @echo - @echo "Build finished; the LaTeX files are in __build/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - mkdir -p __build/changes __build/doctrees - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) __build/changes - @echo - @echo "The overview file is in __build/changes." - -linkcheck: - mkdir -p __build/linkcheck __build/doctrees - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) __build/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in __build/linkcheck/output.txt." Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-01-28 18:25:43 UTC (rev 1632) +++ sphinx/conf.py 2009-01-28 20:08:58 UTC (rev 1633) @@ -24,15 +24,31 @@ project_root = os.path.abspath('..') doc_project_root = os.path.abspath('.') packages = ( 'pydsc', 'pygccxml', 'pyplusplus' ) + +has_true_links = 'linux' in sys.platform for pkg in packages: target = os.path.join( doc_project_root, pkg ) + source = os.path.join( project_root, pkg + '_dev', 'docs' ) sys.path.append( os.path.join( project_root, pkg + '_dev' ) ) - source = os.path.join( project_root, pkg + '_dev', 'docs' ) - if os.path.exists( target ): - shutil.rmtree( target ) - shutil.copytree( source, target, ignore=shutil.ignore_patterns( r'.svn', '*.pyc', 'apidocs', 'www_configuration.py' ) ) -shutil.copy( os.path.join( project_root, 'index.rest' ), doc_project_root ) + if os.path.exists( target ): + if has_true_links: + os.unlink( target ) + else: + shutil.rmtree( target ) + + if has_true_links: + os.symlink( source, target ) + else: + shutil.copytree( source, target, ignore=shutil.ignore_patterns( r'.svn', '*.pyc', 'apidocs', 'www_configuration.py' ) ) +if has_true_links: + if os.path.exists(os.path.join( doc_project_root, 'index.rest' )): + os.unlink( os.path.join( doc_project_root, 'index.rest' ) ) + os.symlink( os.path.join( project_root, 'index.rest' ) + , os.path.join( doc_project_root, 'index.rest' ) ) +else: + shutil.copy( os.path.join( project_root, 'index.rest' ), doc_project_root ) +#disable import replacment os.environ['PYDSC'] = 'sphinx' # General configuration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |