From 71ea183f614037fab50a24432363e1833e2809e5 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 6 May 2020 08:29:03 -0600 Subject: [WIP] Add Sphinx build of API docs [ci skip] First cut includes a Makefile as generated by Sphinx plumbling, needs to be wired into sconscripts instead. A few regular scons files are updated to address build errors/warnings. Signed-off-by: Mats Wichmann --- doc/Makefile | 20 + doc/sphinx/SCons.Node.rst | 38 ++ doc/sphinx/SCons.Platform.rst | 102 ++++ doc/sphinx/SCons.Scanner.rst | 86 ++++ doc/sphinx/SCons.Script.rst | 46 ++ doc/sphinx/SCons.Tool.MSCommon.rst | 62 +++ doc/sphinx/SCons.Tool.clangCommon.rst | 10 + doc/sphinx/SCons.Tool.docbook.rst | 10 + doc/sphinx/SCons.Tool.packaging.rst | 102 ++++ doc/sphinx/SCons.Tool.rst | 904 ++++++++++++++++++++++++++++++++++ doc/sphinx/SCons.Variables.rst | 54 ++ doc/sphinx/SCons.compat.rst | 10 + doc/sphinx/SCons.rst | 211 ++++++++ doc/sphinx/conf.py | 189 +++++++ doc/sphinx/index.rst | 32 ++ 15 files changed, 1876 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/sphinx/SCons.Node.rst create mode 100644 doc/sphinx/SCons.Platform.rst create mode 100644 doc/sphinx/SCons.Scanner.rst create mode 100644 doc/sphinx/SCons.Script.rst create mode 100644 doc/sphinx/SCons.Tool.MSCommon.rst create mode 100644 doc/sphinx/SCons.Tool.clangCommon.rst create mode 100644 doc/sphinx/SCons.Tool.docbook.rst create mode 100644 doc/sphinx/SCons.Tool.packaging.rst create mode 100644 doc/sphinx/SCons.Tool.rst create mode 100644 doc/sphinx/SCons.Variables.rst create mode 100644 doc/sphinx/SCons.compat.rst create mode 100644 doc/sphinx/SCons.rst create mode 100644 doc/sphinx/conf.py create mode 100644 doc/sphinx/index.rst diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..4da19e3 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = SCons +SOURCEDIR = sphinx +BUILDDIR = ../build/doc/api + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/sphinx/SCons.Node.rst b/doc/sphinx/SCons.Node.rst new file mode 100644 index 0000000..b6d5c8f --- /dev/null +++ b/doc/sphinx/SCons.Node.rst @@ -0,0 +1,38 @@ +SCons.Node package +================== + +Submodules +---------- + +SCons.Node.Alias module +----------------------- + +.. automodule:: SCons.Node.Alias + :members: + :undoc-members: + :show-inheritance: + +SCons.Node.FS module +-------------------- + +.. automodule:: SCons.Node.FS + :members: + :undoc-members: + :show-inheritance: + +SCons.Node.Python module +------------------------ + +.. automodule:: SCons.Node.Python + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Node + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Platform.rst b/doc/sphinx/SCons.Platform.rst new file mode 100644 index 0000000..8a55744 --- /dev/null +++ b/doc/sphinx/SCons.Platform.rst @@ -0,0 +1,102 @@ +SCons.Platform package +====================== + +Submodules +---------- + +SCons.Platform.aix module +------------------------- + +.. automodule:: SCons.Platform.aix + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.cygwin module +---------------------------- + +.. automodule:: SCons.Platform.cygwin + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.darwin module +---------------------------- + +.. automodule:: SCons.Platform.darwin + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.hpux module +-------------------------- + +.. automodule:: SCons.Platform.hpux + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.irix module +-------------------------- + +.. automodule:: SCons.Platform.irix + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.mingw module +--------------------------- + +.. automodule:: SCons.Platform.mingw + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.os2 module +------------------------- + +.. automodule:: SCons.Platform.os2 + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.posix module +--------------------------- + +.. automodule:: SCons.Platform.posix + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.sunos module +--------------------------- + +.. automodule:: SCons.Platform.sunos + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.virtualenv module +-------------------------------- + +.. automodule:: SCons.Platform.virtualenv + :members: + :undoc-members: + :show-inheritance: + +SCons.Platform.win32 module +--------------------------- + +.. automodule:: SCons.Platform.win32 + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Platform + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Scanner.rst b/doc/sphinx/SCons.Scanner.rst new file mode 100644 index 0000000..181dbde --- /dev/null +++ b/doc/sphinx/SCons.Scanner.rst @@ -0,0 +1,86 @@ +SCons.Scanner package +===================== + +Submodules +---------- + +SCons.Scanner.C module +---------------------- + +.. automodule:: SCons.Scanner.C + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.D module +---------------------- + +.. automodule:: SCons.Scanner.D + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.Dir module +------------------------ + +.. automodule:: SCons.Scanner.Dir + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.Fortran module +---------------------------- + +.. automodule:: SCons.Scanner.Fortran + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.IDL module +------------------------ + +.. automodule:: SCons.Scanner.IDL + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.LaTeX module +-------------------------- + +.. automodule:: SCons.Scanner.LaTeX + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.Prog module +------------------------- + +.. automodule:: SCons.Scanner.Prog + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.RC module +----------------------- + +.. automodule:: SCons.Scanner.RC + :members: + :undoc-members: + :show-inheritance: + +SCons.Scanner.SWIG module +------------------------- + +.. automodule:: SCons.Scanner.SWIG + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Scanner + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Script.rst b/doc/sphinx/SCons.Script.rst new file mode 100644 index 0000000..704b8fa --- /dev/null +++ b/doc/sphinx/SCons.Script.rst @@ -0,0 +1,46 @@ +SCons.Script package +==================== + +Submodules +---------- + +SCons.Script.Interactive module +------------------------------- + +.. automodule:: SCons.Script.Interactive + :members: + :undoc-members: + :show-inheritance: + +SCons.Script.Main module +------------------------ + +.. automodule:: SCons.Script.Main + :members: + :undoc-members: + :show-inheritance: + +SCons.Script.SConsOptions module +-------------------------------- + +.. automodule:: SCons.Script.SConsOptions + :members: + :undoc-members: + :show-inheritance: + +SCons.Script.SConscript module +------------------------------ + +.. automodule:: SCons.Script.SConscript + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Script + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.MSCommon.rst b/doc/sphinx/SCons.Tool.MSCommon.rst new file mode 100644 index 0000000..a9271ae --- /dev/null +++ b/doc/sphinx/SCons.Tool.MSCommon.rst @@ -0,0 +1,62 @@ +SCons.Tool.MSCommon package +=========================== + +Submodules +---------- + +SCons.Tool.MSCommon.arch module +------------------------------- + +.. automodule:: SCons.Tool.MSCommon.arch + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.MSCommon.common module +--------------------------------- + +.. automodule:: SCons.Tool.MSCommon.common + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.MSCommon.netframework module +--------------------------------------- + +.. automodule:: SCons.Tool.MSCommon.netframework + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.MSCommon.sdk module +------------------------------ + +.. automodule:: SCons.Tool.MSCommon.sdk + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.MSCommon.vc module +----------------------------- + +.. automodule:: SCons.Tool.MSCommon.vc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.MSCommon.vs module +----------------------------- + +.. automodule:: SCons.Tool.MSCommon.vs + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Tool.MSCommon + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.clangCommon.rst b/doc/sphinx/SCons.Tool.clangCommon.rst new file mode 100644 index 0000000..33fce97 --- /dev/null +++ b/doc/sphinx/SCons.Tool.clangCommon.rst @@ -0,0 +1,10 @@ +SCons.Tool.clangCommon package +============================== + +Module contents +--------------- + +.. automodule:: SCons.Tool.clangCommon + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.docbook.rst b/doc/sphinx/SCons.Tool.docbook.rst new file mode 100644 index 0000000..3a9e0b6 --- /dev/null +++ b/doc/sphinx/SCons.Tool.docbook.rst @@ -0,0 +1,10 @@ +SCons.Tool.docbook package +========================== + +Module contents +--------------- + +.. automodule:: SCons.Tool.docbook + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.packaging.rst b/doc/sphinx/SCons.Tool.packaging.rst new file mode 100644 index 0000000..40b2fab --- /dev/null +++ b/doc/sphinx/SCons.Tool.packaging.rst @@ -0,0 +1,102 @@ +SCons.Tool.packaging package +============================ + +Submodules +---------- + +SCons.Tool.packaging.ipk module +------------------------------- + +.. automodule:: SCons.Tool.packaging.ipk + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.msi module +------------------------------- + +.. automodule:: SCons.Tool.packaging.msi + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.rpm module +------------------------------- + +.. automodule:: SCons.Tool.packaging.rpm + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.src\_tarbz2 module +--------------------------------------- + +.. automodule:: SCons.Tool.packaging.src_tarbz2 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.src\_targz module +-------------------------------------- + +.. automodule:: SCons.Tool.packaging.src_targz + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.src\_tarxz module +-------------------------------------- + +.. automodule:: SCons.Tool.packaging.src_tarxz + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.src\_zip module +------------------------------------ + +.. automodule:: SCons.Tool.packaging.src_zip + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.tarbz2 module +---------------------------------- + +.. automodule:: SCons.Tool.packaging.tarbz2 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.targz module +--------------------------------- + +.. automodule:: SCons.Tool.packaging.targz + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.tarxz module +--------------------------------- + +.. automodule:: SCons.Tool.packaging.tarxz + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.packaging.zip module +------------------------------- + +.. automodule:: SCons.Tool.packaging.zip + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Tool.packaging + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.rst b/doc/sphinx/SCons.Tool.rst new file mode 100644 index 0000000..cc5c721 --- /dev/null +++ b/doc/sphinx/SCons.Tool.rst @@ -0,0 +1,904 @@ +SCons.Tool package +================== + +Subpackages +----------- + +.. toctree:: + + SCons.Tool.MSCommon + SCons.Tool.clangCommon + SCons.Tool.docbook + SCons.Tool.packaging + +Submodules +---------- + +SCons.Tool.386asm module +------------------------ + +.. automodule:: SCons.Tool.386asm + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.DCommon module +------------------------- + +.. automodule:: SCons.Tool.DCommon + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.FortranCommon module +------------------------------- + +.. automodule:: SCons.Tool.FortranCommon + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.GettextCommon module +------------------------------- + +.. automodule:: SCons.Tool.GettextCommon + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.JavaCommon module +---------------------------- + +.. automodule:: SCons.Tool.JavaCommon + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.PharLapCommon module +------------------------------- + +.. automodule:: SCons.Tool.PharLapCommon + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.aixc\+\+ module +-------------------------- + +.. automodule:: SCons.Tool.aixc++ + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.aixcc module +----------------------- + +.. automodule:: SCons.Tool.aixcc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.aixcxx module +------------------------ + +.. automodule:: SCons.Tool.aixcxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.aixf77 module +------------------------ + +.. automodule:: SCons.Tool.aixf77 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.aixlink module +------------------------- + +.. automodule:: SCons.Tool.aixlink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.applelink module +--------------------------- + +.. automodule:: SCons.Tool.applelink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ar module +-------------------- + +.. automodule:: SCons.Tool.ar + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.as module +-------------------- + +.. automodule:: SCons.Tool.as + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.bcc32 module +----------------------- + +.. automodule:: SCons.Tool.bcc32 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.c\+\+ module +----------------------- + +.. automodule:: SCons.Tool.c++ + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.cc module +-------------------- + +.. automodule:: SCons.Tool.cc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.clang module +----------------------- + +.. automodule:: SCons.Tool.clang + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.clangxx module +------------------------- + +.. automodule:: SCons.Tool.clangxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.cvf module +--------------------- + +.. automodule:: SCons.Tool.cvf + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.cxx module +--------------------- + +.. automodule:: SCons.Tool.cxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.cyglink module +------------------------- + +.. automodule:: SCons.Tool.cyglink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.default module +------------------------- + +.. automodule:: SCons.Tool.default + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.dmd module +--------------------- + +.. automodule:: SCons.Tool.dmd + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.dvi module +--------------------- + +.. automodule:: SCons.Tool.dvi + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.dvipdf module +------------------------ + +.. automodule:: SCons.Tool.dvipdf + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.dvips module +----------------------- + +.. automodule:: SCons.Tool.dvips + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.f03 module +--------------------- + +.. automodule:: SCons.Tool.f03 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.f08 module +--------------------- + +.. automodule:: SCons.Tool.f08 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.f77 module +--------------------- + +.. automodule:: SCons.Tool.f77 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.f90 module +--------------------- + +.. automodule:: SCons.Tool.f90 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.f95 module +--------------------- + +.. automodule:: SCons.Tool.f95 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.filesystem module +---------------------------- + +.. automodule:: SCons.Tool.filesystem + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.fortran module +------------------------- + +.. automodule:: SCons.Tool.fortran + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.g\+\+ module +----------------------- + +.. automodule:: SCons.Tool.g++ + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.g77 module +--------------------- + +.. automodule:: SCons.Tool.g77 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gas module +--------------------- + +.. automodule:: SCons.Tool.gas + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gcc module +--------------------- + +.. automodule:: SCons.Tool.gcc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gdc module +--------------------- + +.. automodule:: SCons.Tool.gdc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gettext\_tool module +------------------------------- + +.. automodule:: SCons.Tool.gettext_tool + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gfortran module +-------------------------- + +.. automodule:: SCons.Tool.gfortran + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gnulink module +------------------------- + +.. automodule:: SCons.Tool.gnulink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gs module +-------------------- + +.. automodule:: SCons.Tool.gs + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.gxx module +--------------------- + +.. automodule:: SCons.Tool.gxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.hpc\+\+ module +------------------------- + +.. automodule:: SCons.Tool.hpc++ + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.hpcc module +---------------------- + +.. automodule:: SCons.Tool.hpcc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.hpcxx module +----------------------- + +.. automodule:: SCons.Tool.hpcxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.hplink module +------------------------ + +.. automodule:: SCons.Tool.hplink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.icc module +--------------------- + +.. automodule:: SCons.Tool.icc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.icl module +--------------------- + +.. automodule:: SCons.Tool.icl + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ifl module +--------------------- + +.. automodule:: SCons.Tool.ifl + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ifort module +----------------------- + +.. automodule:: SCons.Tool.ifort + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ilink module +----------------------- + +.. automodule:: SCons.Tool.ilink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ilink32 module +------------------------- + +.. automodule:: SCons.Tool.ilink32 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.install module +------------------------- + +.. automodule:: SCons.Tool.install + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.intelc module +------------------------ + +.. automodule:: SCons.Tool.intelc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ipkg module +---------------------- + +.. automodule:: SCons.Tool.ipkg + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.jar module +--------------------- + +.. automodule:: SCons.Tool.jar + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.javac module +----------------------- + +.. automodule:: SCons.Tool.javac + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.javah module +----------------------- + +.. automodule:: SCons.Tool.javah + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.latex module +----------------------- + +.. automodule:: SCons.Tool.latex + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.ldc module +--------------------- + +.. automodule:: SCons.Tool.ldc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.lex module +--------------------- + +.. automodule:: SCons.Tool.lex + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.link module +---------------------- + +.. automodule:: SCons.Tool.link + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.linkloc module +------------------------- + +.. automodule:: SCons.Tool.linkloc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.m4 module +-------------------- + +.. automodule:: SCons.Tool.m4 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.masm module +---------------------- + +.. automodule:: SCons.Tool.masm + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.midl module +---------------------- + +.. automodule:: SCons.Tool.midl + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.mingw module +----------------------- + +.. automodule:: SCons.Tool.mingw + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.msgfmt module +------------------------ + +.. automodule:: SCons.Tool.msgfmt + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.msginit module +------------------------- + +.. automodule:: SCons.Tool.msginit + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.msgmerge module +-------------------------- + +.. automodule:: SCons.Tool.msgmerge + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.mslib module +----------------------- + +.. automodule:: SCons.Tool.mslib + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.mslink module +------------------------ + +.. automodule:: SCons.Tool.mslink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.mssdk module +----------------------- + +.. automodule:: SCons.Tool.mssdk + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.msvc module +---------------------- + +.. automodule:: SCons.Tool.msvc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.msvs module +---------------------- + +.. automodule:: SCons.Tool.msvs + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.mwcc module +---------------------- + +.. automodule:: SCons.Tool.mwcc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.mwld module +---------------------- + +.. automodule:: SCons.Tool.mwld + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.nasm module +---------------------- + +.. automodule:: SCons.Tool.nasm + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.pdf module +--------------------- + +.. automodule:: SCons.Tool.pdf + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.pdflatex module +-------------------------- + +.. automodule:: SCons.Tool.pdflatex + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.pdftex module +------------------------ + +.. automodule:: SCons.Tool.pdftex + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.qt module +-------------------- + +.. automodule:: SCons.Tool.qt + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.rmic module +---------------------- + +.. automodule:: SCons.Tool.rmic + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.rpcgen module +------------------------ + +.. automodule:: SCons.Tool.rpcgen + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.rpm module +--------------------- + +.. automodule:: SCons.Tool.rpm + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.rpmutils module +-------------------------- + +.. automodule:: SCons.Tool.rpmutils + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sgiar module +----------------------- + +.. automodule:: SCons.Tool.sgiar + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sgic\+\+ module +-------------------------- + +.. automodule:: SCons.Tool.sgic++ + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sgicc module +----------------------- + +.. automodule:: SCons.Tool.sgicc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sgicxx module +------------------------ + +.. automodule:: SCons.Tool.sgicxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sgilink module +------------------------- + +.. automodule:: SCons.Tool.sgilink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sunar module +----------------------- + +.. automodule:: SCons.Tool.sunar + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sunc\+\+ module +-------------------------- + +.. automodule:: SCons.Tool.sunc++ + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.suncc module +----------------------- + +.. automodule:: SCons.Tool.suncc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.suncxx module +------------------------ + +.. automodule:: SCons.Tool.suncxx + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sunf77 module +------------------------ + +.. automodule:: SCons.Tool.sunf77 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sunf90 module +------------------------ + +.. automodule:: SCons.Tool.sunf90 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sunf95 module +------------------------ + +.. automodule:: SCons.Tool.sunf95 + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.sunlink module +------------------------- + +.. automodule:: SCons.Tool.sunlink + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.swig module +---------------------- + +.. automodule:: SCons.Tool.swig + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.tar module +--------------------- + +.. automodule:: SCons.Tool.tar + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.tex module +--------------------- + +.. automodule:: SCons.Tool.tex + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.textfile module +-------------------------- + +.. automodule:: SCons.Tool.textfile + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.tlib module +---------------------- + +.. automodule:: SCons.Tool.tlib + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.wix module +--------------------- + +.. automodule:: SCons.Tool.wix + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.xgettext module +-------------------------- + +.. automodule:: SCons.Tool.xgettext + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.yacc module +---------------------- + +.. automodule:: SCons.Tool.yacc + :members: + :undoc-members: + :show-inheritance: + +SCons.Tool.zip module +--------------------- + +.. automodule:: SCons.Tool.zip + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Tool + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.Variables.rst b/doc/sphinx/SCons.Variables.rst new file mode 100644 index 0000000..dc2388a --- /dev/null +++ b/doc/sphinx/SCons.Variables.rst @@ -0,0 +1,54 @@ +SCons.Variables package +======================= + +Submodules +---------- + +SCons.Variables.BoolVariable module +----------------------------------- + +.. automodule:: SCons.Variables.BoolVariable + :members: + :undoc-members: + :show-inheritance: + +SCons.Variables.EnumVariable module +----------------------------------- + +.. automodule:: SCons.Variables.EnumVariable + :members: + :undoc-members: + :show-inheritance: + +SCons.Variables.ListVariable module +----------------------------------- + +.. automodule:: SCons.Variables.ListVariable + :members: + :undoc-members: + :show-inheritance: + +SCons.Variables.PackageVariable module +-------------------------------------- + +.. automodule:: SCons.Variables.PackageVariable + :members: + :undoc-members: + :show-inheritance: + +SCons.Variables.PathVariable module +----------------------------------- + +.. automodule:: SCons.Variables.PathVariable + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons.Variables + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.compat.rst b/doc/sphinx/SCons.compat.rst new file mode 100644 index 0000000..d80b555 --- /dev/null +++ b/doc/sphinx/SCons.compat.rst @@ -0,0 +1,10 @@ +SCons.compat package +==================== + +Module contents +--------------- + +.. automodule:: SCons.compat + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/SCons.rst b/doc/sphinx/SCons.rst new file mode 100644 index 0000000..817011b --- /dev/null +++ b/doc/sphinx/SCons.rst @@ -0,0 +1,211 @@ +SCons package +============= + +Subpackages +----------- + +.. toctree:: + + SCons.Node + SCons.Platform + SCons.Scanner + SCons.Script + SCons.Tool + SCons.Variables + SCons.compat + +Submodules +---------- + +SCons.Action module +------------------- + +.. automodule:: SCons.Action + :members: + :undoc-members: + :show-inheritance: + +SCons.Builder module +-------------------- + +.. automodule:: SCons.Builder + :members: + :undoc-members: + :show-inheritance: + +SCons.CacheDir module +--------------------- + +.. automodule:: SCons.CacheDir + :members: + :undoc-members: + :show-inheritance: + +SCons.Conftest module +--------------------- + +.. automodule:: SCons.Conftest + :members: + :undoc-members: + :show-inheritance: + +SCons.Debug module +------------------ + +.. automodule:: SCons.Debug + :members: + :undoc-members: + :show-inheritance: + +SCons.Defaults module +--------------------- + +.. automodule:: SCons.Defaults + :members: + :undoc-members: + :show-inheritance: + +SCons.Environment module +------------------------ + +.. automodule:: SCons.Environment + :members: + :undoc-members: + :show-inheritance: + +SCons.EnvironmentValues module +------------------------------ + +.. automodule:: SCons.EnvironmentValues + :members: + :undoc-members: + :show-inheritance: + +SCons.EnvironmentValuesTest module +---------------------------------- + +.. automodule:: SCons.EnvironmentValuesTest + :members: + :undoc-members: + :show-inheritance: + +SCons.Errors module +------------------- + +.. automodule:: SCons.Errors + :members: + :undoc-members: + :show-inheritance: + +SCons.Executor module +--------------------- + +.. automodule:: SCons.Executor + :members: + :undoc-members: + :show-inheritance: + +SCons.Job module +---------------- + +.. automodule:: SCons.Job + :members: + :undoc-members: + :show-inheritance: + +SCons.Memoize module +-------------------- + +.. automodule:: SCons.Memoize + :members: + :undoc-members: + :show-inheritance: + +SCons.PathList module +--------------------- + +.. automodule:: SCons.PathList + :members: + :undoc-members: + :show-inheritance: + +SCons.SConf module +------------------ + +.. automodule:: SCons.SConf + :members: + :undoc-members: + :show-inheritance: + +SCons.SConsign module +--------------------- + +.. automodule:: SCons.SConsign + :members: + :undoc-members: + :show-inheritance: + +SCons.Subst module +------------------ + +.. automodule:: SCons.Subst + :members: + :undoc-members: + :show-inheritance: + +SCons.Taskmaster module +----------------------- + +.. automodule:: SCons.Taskmaster + :members: + :undoc-members: + :show-inheritance: + +SCons.Util module +----------------- + +.. automodule:: SCons.Util + :members: + :undoc-members: + :show-inheritance: + +SCons.Warnings module +--------------------- + +.. automodule:: SCons.Warnings + :members: + :undoc-members: + :show-inheritance: + +SCons.cpp module +---------------- + +.. automodule:: SCons.cpp + :members: + :undoc-members: + :show-inheritance: + +SCons.dblite module +------------------- + +.. automodule:: SCons.dblite + :members: + :undoc-members: + :show-inheritance: + +SCons.exitfuncs module +---------------------- + +.. automodule:: SCons.exitfuncs + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: SCons + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py new file mode 100644 index 0000000..7761910 --- /dev/null +++ b/doc/sphinx/conf.py @@ -0,0 +1,189 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# SCons documentation build configuration file, created by +# sphinx-quickstart on Mon Apr 30 09:36:53 2018. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../../src/engine/')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +needs_sphinx = '1.3' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.napoleon', + 'sphinx.ext.todo', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages' +] + +autodoc_default_flags = [":members:", ":undoc-members:", ":show-inheritance:"] +autodoc_exclude_members = ['*Tests'] +napoleon_include_special_with_doc = False +napoleon_include_private_with_doc = False + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'SCons API' +copyright = '2020, SCons Project' +author = 'SCons Project' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '4.0' +# The full version, including alpha/beta/rc tags. +release = '4.0.0a1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path . +exclude_patterns = ["*Tests.py"] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +#html_theme = 'alabaster' +html_theme = 'classic' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +# html_sidebars = {} + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'SConsAPIDocs' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ( + master_doc, + "SConsAPIDocs.tex", + "SCons API Documentation", + "SCons Project", + "manual", + ) +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'sconsapidocs', 'SCons API Documentation', [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + master_doc, + "SConsAPIDocs", + "SCons API Documentation", + author, + "SConsAPIDocs", + "One line description of project.", + "Miscellaneous", + ) +] + + +# -- Options for Epub output ------------------------------------------------- + diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst new file mode 100644 index 0000000..996d258 --- /dev/null +++ b/doc/sphinx/index.rst @@ -0,0 +1,32 @@ +.. SCons documentation master file, created by + sphinx-quickstart on Mon Apr 30 09:36:53 2018. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SCons Project API Documentation +=============================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + SCons + SCons.compat + SCons.Node + SCons.Platform + SCons.Scanner + SCons.Script + SCons.Tool + SCons.Tool.clangCommon + SCons.Tool.docbook + SCons.Tool.MSCommon + SCons.Tool.packaging. + SCons.Variables + + +Indices and Tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` -- cgit v0.12 From 3494131597b69a355474b348a4b890668e9f30be Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 6 May 2020 09:06:54 -0600 Subject: Commit the files changed for Sphinx docbuild [ci skip] Signed-off-by: Mats Wichmann --- SCons/Environment.py | 6 +++--- SCons/Errors.py | 7 ++----- SCons/Platform/__init__.py | 13 ++++++++----- SCons/Script/SConsOptions.py | 4 +++- SCons/Tool/dmd.py | 35 +++++++++++++++++++++++------------ SCons/Tool/intelc.py | 14 +++++++------- SCons/Tool/packaging/rpm.py | 22 ++++++++++++---------- SCons/Util.py | 27 ++++++++++++++++----------- SCons/cpp.py | 3 +-- doc/sphinx/index.rst | 2 +- 10 files changed, 76 insertions(+), 57 deletions(-) diff --git a/SCons/Environment.py b/SCons/Environment.py index cd52ee5..7d4db39 100644 --- a/SCons/Environment.py +++ b/SCons/Environment.py @@ -1502,11 +1502,11 @@ class Base(SubstitutionEnvironment): def Dictionary(self, *args): """Return construction variables from an environment. - :param *args: (optional) variable names to look up + :param args: (optional) variable names to look up :returns: if args omitted, the dictionary of all constr. vars. If one arg, the corresponding value is returned. If more than one arg, a list of values is returned. - :raises KeyError: if any of *args is not in the construction env. + :raises KeyError: if any of args is not in the construction env. """ if not args: @@ -2017,7 +2017,7 @@ class Base(SubstitutionEnvironment): pass else: del kw['target_factory'] - + bld = SCons.Builder.Builder(**bkw) return bld(self, target, source, **kw) diff --git a/SCons/Errors.py b/SCons/Errors.py index a3a891f..882ae82 100644 --- a/SCons/Errors.py +++ b/SCons/Errors.py @@ -35,13 +35,11 @@ import SCons.Util class BuildError(Exception): - """ Errors occurring while building. + """SCons Errors that can occur while building. - BuildError have the following attributes: - ========================================= + BuildError has the following attributes: Information about the cause of the build error: - ----------------------------------------------- errstr : a description of the error message @@ -71,7 +69,6 @@ class BuildError(Exception): Information about the cause of the location of the error: - --------------------------------------------------------- node : the error occured while building this target node(s) diff --git a/SCons/Platform/__init__.py b/SCons/Platform/__init__.py index 12db824..b6a7b97 100644 --- a/SCons/Platform/__init__.py +++ b/SCons/Platform/__init__.py @@ -58,8 +58,8 @@ import SCons.Tool def platform_default(): """Return the platform string for our execution environment. - The returned value should map to one of the SCons/Platform/*.py - files. Since we're architecture independent, though, we don't + The returned value should map to one of the SCons/Platform/\*.py + files. Since scons is architecture independent, though, we don't care about the machine architecture. """ osname = os.name @@ -136,20 +136,23 @@ class TempFileMunge: file substitution on it. This is used to circumvent the long command line limitation. - Example usage: + Example: + env["TEMPFILE"] = TempFileMunge env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES','$LINKCOMSTR')}" By default, the name of the temporary file used begins with a prefix of '@'. This may be configured for other tool chains by - setting '$TEMPFILEPREFIX': + setting '$TEMPFILEPREFIX'. Example: + env["TEMPFILEPREFIX"] = '-@' # diab compiler env["TEMPFILEPREFIX"] = '-via' # arm tool chain env["TEMPFILEPREFIX"] = '' # (the empty string) PC Lint You can configure the extension of the temporary file through the TEMPFILESUFFIX variable, which defaults to '.lnk' (see comments - in the code below): + in the code below). Example: + env["TEMPFILESUFFIX"] = '.lnt' # PC Lint """ def __init__(self, cmd, cmdstr = None): diff --git a/SCons/Script/SConsOptions.py b/SCons/Script/SConsOptions.py index 10600b6..5d61e32 100644 --- a/SCons/Script/SConsOptions.py +++ b/SCons/Script/SConsOptions.py @@ -345,7 +345,8 @@ class SConsOptionParser(optparse.OptionParser): Else, this would lead to problems in add_local_option() below. When called from there, we try to reparse the - command-line arguments that + command-line arguments that: + 1. haven't been processed so far (self.largs), but 2. are possibly not added to the list of options yet. @@ -355,6 +356,7 @@ class SConsOptionParser(optparse.OptionParser): _match_long_opt(), which allows for partial matches of the option name, as long as the common prefix appears to be unique. + This would lead to further confusion, because we might want to add another option "--myarg" later on (see issue #2929). diff --git a/SCons/Tool/dmd.py b/SCons/Tool/dmd.py index 3cc4ed0..32b9c02 100644 --- a/SCons/Tool/dmd.py +++ b/SCons/Tool/dmd.py @@ -10,22 +10,33 @@ Evolved by Russel Winder (russel@winder.org.uk) 2010-02-07 onwards Compiler variables: - DC - The name of the D compiler to use. Defaults to dmd or gdmd, - whichever is found. - DPATH - List of paths to search for import modules. - DVERSIONS - List of version tags to enable when compiling. - DDEBUG - List of debug tags to enable when compiling. + + DC + The name of the D compiler to use. Defaults to dmd or gdmd, whichever is found. + DPATH + List of paths to search for import modules. + DVERSIONS + List of version tags to enable when compiling. + DDEBUG + List of debug tags to enable when compiling. Linker related variables: - LIBS - List of library files to link in. - DLINK - Name of the linker to use. Defaults to dmd or gdmd, - whichever is found. - DLINKFLAGS - List of linker flags. + + LIBS + List of library files to link in. + DLINK + Name of the linker to use. Defaults to dmd or gdmd, whichever is found. + DLINKFLAGS + List of linker flags. Lib tool variables: - DLIB - Name of the lib tool to use. Defaults to lib. - DLIBFLAGS - List of flags to pass to the lib tool. - LIBS - Same as for the linker. (libraries to pull into the .lib) + + DLIB + Name of the lib tool to use. Defaults to lib. + DLIBFLAGS + List of flags to pass to the lib tool. + LIBS + Same as for the linker. (libraries to pull into the .lib) """ # diff --git a/SCons/Tool/intelc.py b/SCons/Tool/intelc.py index 0880976..2242e60 100644 --- a/SCons/Tool/intelc.py +++ b/SCons/Tool/intelc.py @@ -387,13 +387,13 @@ def get_intel_compiler_top(version, abi): def generate(env, version=None, abi=None, topdir=None, verbose=0): r"""Add Builders and construction variables for Intel C/C++ compiler to an Environment. - args: - version: (string) compiler version to use, like "80" - abi: (string) 'win32' or whatever Itanium version wants - topdir: (string) compiler top dir, like - "c:\Program Files\Intel\Compiler70" - If topdir is used, version and abi are ignored. - verbose: (int) if >0, prints compiler version used. + + :param string version: compiler version to use, like "80" + :param string abi: 'win32' or whatever Itanium version wants + :param string topdir: directory containing compiler tree, e.g. + "c:\\Program Files\\Intel\\Compiler70". + If `topdir` is used, `version` and `abi` are ignored. + :param int verbose: if >0, prints compiler version used. """ if not (is_mac or is_linux or is_windows): # can't handle this platform diff --git a/SCons/Tool/packaging/rpm.py b/SCons/Tool/packaging/rpm.py index 0e44bf9..9e2bbb0 100644 --- a/SCons/Tool/packaging/rpm.py +++ b/SCons/Tool/packaging/rpm.py @@ -302,21 +302,23 @@ def build_specfile_filesection(spec, files): return str class SimpleTagCompiler: - """ This class is a simple string substition utility: - the replacement specfication is stored in the tagset dictionary, something - like: - { "abc" : "cdef %s ", - "abc_" : "cdef %s %s" } + """ Compile RPM tags by doing simple string substitution. - the compile function gets a value dictionary, which may look like: - { "abc" : "ghij", - "abc_gh" : "ij" } + The replacement specfication is stored in the *tagset* dictionary, + something like: + + {"abc" : "cdef %s ", "abc_": "cdef %s %s"} + + The :func:`compile` function gets a value dictionary, which may look like: + + {"abc": "ghij", "abc_gh": "ij"} The resulting string will be: - "cdef ghij cdef gh ij" + + "cdef ghij cdef gh ij" """ def __init__(self, tagset, mandatory=1): - self.tagset = tagset + self.tagset = tagset self.mandatory = mandatory def compile(self, values): diff --git a/SCons/Util.py b/SCons/Util.py index 1ec0cf8..effe4c4 100644 --- a/SCons/Util.py +++ b/SCons/Util.py @@ -1611,16 +1611,18 @@ def cmp(a, b): def get_env_bool(env, name, default=False): - """Get a value of env[name] converted to boolean. The value of env[name] is - interpreted as follows: 'true', 'yes', 'y', 'on' (case insensitive) and - anything convertible to int that yields non-zero integer are True values; - '0', 'false', 'no', 'n' and 'off' (case insensitive) are False values. For - all other cases, default value is returned. - - :Parameters: - - `env` - dict or dict-like object, a convainer with variables - - `name` - name of the variable in env to be returned - - `default` - returned when env[name] does not exist or can't be converted to bool + """Convert a construction variable to bool. + + If the value of *name* in *env* is 'true', 'yes', 'y', 'on' (case + insensitive) or anything convertible to int that yields non-zero then + return True; if 'false', 'no', 'n', 'off' (case insensitive) + or a number that converts to integer zero return False. + Otherwise, return *default*. + + :param env: construction environment, or any dict-like object + :param name: name of the variable + :param default: value to return if name not in env or cannot be converted (default: False) + :rtype: bool """ try: var = env[name] @@ -1638,7 +1640,10 @@ def get_env_bool(env, name, default=False): def get_os_env_bool(name, default=False): - """Same as get_env_bool(os.environ, name, default).""" + """Convert an environment variable to bool. + + Conversion is the same as for :func:`get_env_bool`. + """ return get_env_bool(os.environ, name, default) # Local Variables: diff --git a/SCons/cpp.py b/SCons/cpp.py index 1113be5..0811c71 100644 --- a/SCons/cpp.py +++ b/SCons/cpp.py @@ -603,8 +603,7 @@ class PreProcessor: This handles recursive expansion of values without "" or <> surrounding the name until an initial " or < is found, to handle - #include FILE - where FILE is a #define somewhere else. + #include FILE where FILE is a #define somewhere else. """ s = t[1].strip() while not s[0] in '<"': diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index 996d258..3c3ee0e 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -20,7 +20,7 @@ SCons Project API Documentation SCons.Tool.clangCommon SCons.Tool.docbook SCons.Tool.MSCommon - SCons.Tool.packaging. + SCons.Tool.packaging SCons.Variables -- cgit v0.12 From 19bc1520f0fe52662c9fc49a68652730f4544448 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 24 May 2020 08:30:34 -0600 Subject: Update sphinx build, add autoclasstoc [ci skip] autoclasstoc enabled, but not particularly used yet. Signed-off-by: Mats Wichmann --- bin/scons_dev_master.py | 20 +- doc/sphinx/SCons.Tool.MSCommon.rst | 62 --- doc/sphinx/SCons.Tool.clangCommon.rst | 10 - doc/sphinx/SCons.Tool.docbook.rst | 10 - doc/sphinx/SCons.Tool.packaging.rst | 102 ---- doc/sphinx/SCons.Tool.rst | 894 ---------------------------------- doc/sphinx/SCons.rst | 17 +- doc/sphinx/conf.py | 19 +- doc/sphinx/index.rst | 4 - 9 files changed, 32 insertions(+), 1106 deletions(-) delete mode 100644 doc/sphinx/SCons.Tool.MSCommon.rst delete mode 100644 doc/sphinx/SCons.Tool.clangCommon.rst delete mode 100644 doc/sphinx/SCons.Tool.docbook.rst delete mode 100644 doc/sphinx/SCons.Tool.packaging.rst diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py index 5ed7d49..26beb62 100755 --- a/bin/scons_dev_master.py +++ b/bin/scons_dev_master.py @@ -33,14 +33,12 @@ PYTHON_PACKAGES = [ ] BUILDING_PACKAGES = [ - 'python-libxml2', - 'python-libxslt1', + 'python3-lxml', 'fop', - 'python-dev', - 'python-epydoc', + 'python3-dev', 'rpm', 'tar', - 'lynx' + 'lynx', # additional packages that Bill Deegan's web page suggests #'docbook-to-man', @@ -51,15 +49,17 @@ BUILDING_PACKAGES = [ # for ubuntu 9.10 # 'texlive-lang-french' + 'python3-sphinx', + 'sphinx-rtd-theme-common', ] DOCUMENTATION_PACKAGES = [ 'docbook-doc', - 'epydoc-doc', + 'sphinx-doc', 'gcc-doc', 'pkg-config', - 'python-doc', + 'python3-doc', 'openjdk-8-doc', 'swig-doc', 'texlive-doc', @@ -79,10 +79,10 @@ TESTING_PACKAGES = [ 'm4', 'openssh-client', 'openssh-server', - 'python-profiler', - 'python-all-dev', + 'python3-profiler', + 'python3-line-profiler', 'python3-all-dev', - 'pypy-dev', + 'pypy3-dev', 'rcs', 'rpm', 'openjdk-8-jdk', diff --git a/doc/sphinx/SCons.Tool.MSCommon.rst b/doc/sphinx/SCons.Tool.MSCommon.rst deleted file mode 100644 index a9271ae..0000000 --- a/doc/sphinx/SCons.Tool.MSCommon.rst +++ /dev/null @@ -1,62 +0,0 @@ -SCons.Tool.MSCommon package -=========================== - -Submodules ----------- - -SCons.Tool.MSCommon.arch module -------------------------------- - -.. automodule:: SCons.Tool.MSCommon.arch - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.MSCommon.common module ---------------------------------- - -.. automodule:: SCons.Tool.MSCommon.common - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.MSCommon.netframework module ---------------------------------------- - -.. automodule:: SCons.Tool.MSCommon.netframework - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.MSCommon.sdk module ------------------------------- - -.. automodule:: SCons.Tool.MSCommon.sdk - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.MSCommon.vc module ------------------------------ - -.. automodule:: SCons.Tool.MSCommon.vc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.MSCommon.vs module ------------------------------ - -.. automodule:: SCons.Tool.MSCommon.vs - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: SCons.Tool.MSCommon - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.clangCommon.rst b/doc/sphinx/SCons.Tool.clangCommon.rst deleted file mode 100644 index 33fce97..0000000 --- a/doc/sphinx/SCons.Tool.clangCommon.rst +++ /dev/null @@ -1,10 +0,0 @@ -SCons.Tool.clangCommon package -============================== - -Module contents ---------------- - -.. automodule:: SCons.Tool.clangCommon - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.docbook.rst b/doc/sphinx/SCons.Tool.docbook.rst deleted file mode 100644 index 3a9e0b6..0000000 --- a/doc/sphinx/SCons.Tool.docbook.rst +++ /dev/null @@ -1,10 +0,0 @@ -SCons.Tool.docbook package -========================== - -Module contents ---------------- - -.. automodule:: SCons.Tool.docbook - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.packaging.rst b/doc/sphinx/SCons.Tool.packaging.rst deleted file mode 100644 index 40b2fab..0000000 --- a/doc/sphinx/SCons.Tool.packaging.rst +++ /dev/null @@ -1,102 +0,0 @@ -SCons.Tool.packaging package -============================ - -Submodules ----------- - -SCons.Tool.packaging.ipk module -------------------------------- - -.. automodule:: SCons.Tool.packaging.ipk - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.msi module -------------------------------- - -.. automodule:: SCons.Tool.packaging.msi - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.rpm module -------------------------------- - -.. automodule:: SCons.Tool.packaging.rpm - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.src\_tarbz2 module ---------------------------------------- - -.. automodule:: SCons.Tool.packaging.src_tarbz2 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.src\_targz module --------------------------------------- - -.. automodule:: SCons.Tool.packaging.src_targz - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.src\_tarxz module --------------------------------------- - -.. automodule:: SCons.Tool.packaging.src_tarxz - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.src\_zip module ------------------------------------- - -.. automodule:: SCons.Tool.packaging.src_zip - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.tarbz2 module ----------------------------------- - -.. automodule:: SCons.Tool.packaging.tarbz2 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.targz module ---------------------------------- - -.. automodule:: SCons.Tool.packaging.targz - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.tarxz module ---------------------------------- - -.. automodule:: SCons.Tool.packaging.tarxz - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.packaging.zip module -------------------------------- - -.. automodule:: SCons.Tool.packaging.zip - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: SCons.Tool.packaging - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/sphinx/SCons.Tool.rst b/doc/sphinx/SCons.Tool.rst index cc5c721..151e6fa 100644 --- a/doc/sphinx/SCons.Tool.rst +++ b/doc/sphinx/SCons.Tool.rst @@ -1,900 +1,6 @@ SCons.Tool package ================== -Subpackages ------------ - -.. toctree:: - - SCons.Tool.MSCommon - SCons.Tool.clangCommon - SCons.Tool.docbook - SCons.Tool.packaging - -Submodules ----------- - -SCons.Tool.386asm module ------------------------- - -.. automodule:: SCons.Tool.386asm - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.DCommon module -------------------------- - -.. automodule:: SCons.Tool.DCommon - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.FortranCommon module -------------------------------- - -.. automodule:: SCons.Tool.FortranCommon - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.GettextCommon module -------------------------------- - -.. automodule:: SCons.Tool.GettextCommon - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.JavaCommon module ----------------------------- - -.. automodule:: SCons.Tool.JavaCommon - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.PharLapCommon module -------------------------------- - -.. automodule:: SCons.Tool.PharLapCommon - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.aixc\+\+ module --------------------------- - -.. automodule:: SCons.Tool.aixc++ - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.aixcc module ------------------------ - -.. automodule:: SCons.Tool.aixcc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.aixcxx module ------------------------- - -.. automodule:: SCons.Tool.aixcxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.aixf77 module ------------------------- - -.. automodule:: SCons.Tool.aixf77 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.aixlink module -------------------------- - -.. automodule:: SCons.Tool.aixlink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.applelink module ---------------------------- - -.. automodule:: SCons.Tool.applelink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ar module --------------------- - -.. automodule:: SCons.Tool.ar - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.as module --------------------- - -.. automodule:: SCons.Tool.as - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.bcc32 module ------------------------ - -.. automodule:: SCons.Tool.bcc32 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.c\+\+ module ------------------------ - -.. automodule:: SCons.Tool.c++ - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.cc module --------------------- - -.. automodule:: SCons.Tool.cc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.clang module ------------------------ - -.. automodule:: SCons.Tool.clang - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.clangxx module -------------------------- - -.. automodule:: SCons.Tool.clangxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.cvf module ---------------------- - -.. automodule:: SCons.Tool.cvf - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.cxx module ---------------------- - -.. automodule:: SCons.Tool.cxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.cyglink module -------------------------- - -.. automodule:: SCons.Tool.cyglink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.default module -------------------------- - -.. automodule:: SCons.Tool.default - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.dmd module ---------------------- - -.. automodule:: SCons.Tool.dmd - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.dvi module ---------------------- - -.. automodule:: SCons.Tool.dvi - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.dvipdf module ------------------------- - -.. automodule:: SCons.Tool.dvipdf - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.dvips module ------------------------ - -.. automodule:: SCons.Tool.dvips - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.f03 module ---------------------- - -.. automodule:: SCons.Tool.f03 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.f08 module ---------------------- - -.. automodule:: SCons.Tool.f08 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.f77 module ---------------------- - -.. automodule:: SCons.Tool.f77 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.f90 module ---------------------- - -.. automodule:: SCons.Tool.f90 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.f95 module ---------------------- - -.. automodule:: SCons.Tool.f95 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.filesystem module ----------------------------- - -.. automodule:: SCons.Tool.filesystem - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.fortran module -------------------------- - -.. automodule:: SCons.Tool.fortran - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.g\+\+ module ------------------------ - -.. automodule:: SCons.Tool.g++ - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.g77 module ---------------------- - -.. automodule:: SCons.Tool.g77 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gas module ---------------------- - -.. automodule:: SCons.Tool.gas - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gcc module ---------------------- - -.. automodule:: SCons.Tool.gcc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gdc module ---------------------- - -.. automodule:: SCons.Tool.gdc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gettext\_tool module -------------------------------- - -.. automodule:: SCons.Tool.gettext_tool - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gfortran module --------------------------- - -.. automodule:: SCons.Tool.gfortran - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gnulink module -------------------------- - -.. automodule:: SCons.Tool.gnulink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gs module --------------------- - -.. automodule:: SCons.Tool.gs - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.gxx module ---------------------- - -.. automodule:: SCons.Tool.gxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.hpc\+\+ module -------------------------- - -.. automodule:: SCons.Tool.hpc++ - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.hpcc module ----------------------- - -.. automodule:: SCons.Tool.hpcc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.hpcxx module ------------------------ - -.. automodule:: SCons.Tool.hpcxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.hplink module ------------------------- - -.. automodule:: SCons.Tool.hplink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.icc module ---------------------- - -.. automodule:: SCons.Tool.icc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.icl module ---------------------- - -.. automodule:: SCons.Tool.icl - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ifl module ---------------------- - -.. automodule:: SCons.Tool.ifl - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ifort module ------------------------ - -.. automodule:: SCons.Tool.ifort - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ilink module ------------------------ - -.. automodule:: SCons.Tool.ilink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ilink32 module -------------------------- - -.. automodule:: SCons.Tool.ilink32 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.install module -------------------------- - -.. automodule:: SCons.Tool.install - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.intelc module ------------------------- - -.. automodule:: SCons.Tool.intelc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ipkg module ----------------------- - -.. automodule:: SCons.Tool.ipkg - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.jar module ---------------------- - -.. automodule:: SCons.Tool.jar - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.javac module ------------------------ - -.. automodule:: SCons.Tool.javac - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.javah module ------------------------ - -.. automodule:: SCons.Tool.javah - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.latex module ------------------------ - -.. automodule:: SCons.Tool.latex - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.ldc module ---------------------- - -.. automodule:: SCons.Tool.ldc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.lex module ---------------------- - -.. automodule:: SCons.Tool.lex - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.link module ----------------------- - -.. automodule:: SCons.Tool.link - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.linkloc module -------------------------- - -.. automodule:: SCons.Tool.linkloc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.m4 module --------------------- - -.. automodule:: SCons.Tool.m4 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.masm module ----------------------- - -.. automodule:: SCons.Tool.masm - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.midl module ----------------------- - -.. automodule:: SCons.Tool.midl - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.mingw module ------------------------ - -.. automodule:: SCons.Tool.mingw - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.msgfmt module ------------------------- - -.. automodule:: SCons.Tool.msgfmt - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.msginit module -------------------------- - -.. automodule:: SCons.Tool.msginit - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.msgmerge module --------------------------- - -.. automodule:: SCons.Tool.msgmerge - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.mslib module ------------------------ - -.. automodule:: SCons.Tool.mslib - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.mslink module ------------------------- - -.. automodule:: SCons.Tool.mslink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.mssdk module ------------------------ - -.. automodule:: SCons.Tool.mssdk - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.msvc module ----------------------- - -.. automodule:: SCons.Tool.msvc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.msvs module ----------------------- - -.. automodule:: SCons.Tool.msvs - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.mwcc module ----------------------- - -.. automodule:: SCons.Tool.mwcc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.mwld module ----------------------- - -.. automodule:: SCons.Tool.mwld - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.nasm module ----------------------- - -.. automodule:: SCons.Tool.nasm - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.pdf module ---------------------- - -.. automodule:: SCons.Tool.pdf - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.pdflatex module --------------------------- - -.. automodule:: SCons.Tool.pdflatex - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.pdftex module ------------------------- - -.. automodule:: SCons.Tool.pdftex - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.qt module --------------------- - -.. automodule:: SCons.Tool.qt - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.rmic module ----------------------- - -.. automodule:: SCons.Tool.rmic - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.rpcgen module ------------------------- - -.. automodule:: SCons.Tool.rpcgen - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.rpm module ---------------------- - -.. automodule:: SCons.Tool.rpm - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.rpmutils module --------------------------- - -.. automodule:: SCons.Tool.rpmutils - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sgiar module ------------------------ - -.. automodule:: SCons.Tool.sgiar - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sgic\+\+ module --------------------------- - -.. automodule:: SCons.Tool.sgic++ - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sgicc module ------------------------ - -.. automodule:: SCons.Tool.sgicc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sgicxx module ------------------------- - -.. automodule:: SCons.Tool.sgicxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sgilink module -------------------------- - -.. automodule:: SCons.Tool.sgilink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sunar module ------------------------ - -.. automodule:: SCons.Tool.sunar - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sunc\+\+ module --------------------------- - -.. automodule:: SCons.Tool.sunc++ - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.suncc module ------------------------ - -.. automodule:: SCons.Tool.suncc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.suncxx module ------------------------- - -.. automodule:: SCons.Tool.suncxx - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sunf77 module ------------------------- - -.. automodule:: SCons.Tool.sunf77 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sunf90 module ------------------------- - -.. automodule:: SCons.Tool.sunf90 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sunf95 module ------------------------- - -.. automodule:: SCons.Tool.sunf95 - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.sunlink module -------------------------- - -.. automodule:: SCons.Tool.sunlink - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.swig module ----------------------- - -.. automodule:: SCons.Tool.swig - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.tar module ---------------------- - -.. automodule:: SCons.Tool.tar - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.tex module ---------------------- - -.. automodule:: SCons.Tool.tex - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.textfile module --------------------------- - -.. automodule:: SCons.Tool.textfile - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.tlib module ----------------------- - -.. automodule:: SCons.Tool.tlib - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.wix module ---------------------- - -.. automodule:: SCons.Tool.wix - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.xgettext module --------------------------- - -.. automodule:: SCons.Tool.xgettext - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.yacc module ----------------------- - -.. automodule:: SCons.Tool.yacc - :members: - :undoc-members: - :show-inheritance: - -SCons.Tool.zip module ---------------------- - -.. automodule:: SCons.Tool.zip - :members: - :undoc-members: - :show-inheritance: - - Module contents --------------- diff --git a/doc/sphinx/SCons.rst b/doc/sphinx/SCons.rst index 817011b..c92b957 100644 --- a/doc/sphinx/SCons.rst +++ b/doc/sphinx/SCons.rst @@ -1,6 +1,14 @@ SCons package ============= +Module contents +--------------- + +.. automodule:: SCons + :members: + :undoc-members: + :show-inheritance: + Subpackages ----------- @@ -200,12 +208,3 @@ SCons.exitfuncs module :members: :undoc-members: :show-inheritance: - - -Module contents ---------------- - -.. automodule:: SCons - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 7761910..474f765 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -31,18 +31,27 @@ needs_sphinx = '1.3' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'autoclasstoc', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', + #'sphinx.ext.githubpages' 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext.viewcode', - 'sphinx.ext.githubpages' ] autodoc_default_flags = [":members:", ":undoc-members:", ":show-inheritance:"] +autodoc_default_options = { + "members": True, + "special-members": True, + "private-members": True, + "inherited-members": True, + "undoc-members": True, + "exclude-members": '__weakref__', +} autodoc_exclude_members = ['*Tests'] -napoleon_include_special_with_doc = False -napoleon_include_private_with_doc = False +napoleon_include_special_with_doc = True +napoleon_include_private_with_doc = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -56,9 +65,9 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'SCons API' +project = 'SCons' copyright = '2020, SCons Project' -author = 'SCons Project' +author = 'SCons Project Team' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index 3c3ee0e..eec3750 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -17,10 +17,6 @@ SCons Project API Documentation SCons.Scanner SCons.Script SCons.Tool - SCons.Tool.clangCommon - SCons.Tool.docbook - SCons.Tool.MSCommon - SCons.Tool.packaging SCons.Variables -- cgit v0.12 From ff57c327cd155d5e1c734b81ee954663ab2c5a20 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 27 May 2020 08:11:43 -0600 Subject: A bit more sphinx docbuild tweaking [ci skip] Signed-off-by: Mats Wichmann --- SCons/Environment.py | 2 +- SCons/Platform/__init__.py | 17 +++++++++-------- SCons/Script/SConsOptions.py | 4 ++-- SCons/dblite.py | 1 + doc/sphinx/SCons.rst | 16 ---------------- doc/sphinx/conf.py | 3 ++- 6 files changed, 15 insertions(+), 28 deletions(-) diff --git a/SCons/Environment.py b/SCons/Environment.py index 7d4db39..28906ea 100644 --- a/SCons/Environment.py +++ b/SCons/Environment.py @@ -1500,7 +1500,7 @@ class Base(SubstitutionEnvironment): def Dictionary(self, *args): - """Return construction variables from an environment. + r"""Return construction variables from an environment. :param args: (optional) variable names to look up :returns: if args omitted, the dictionary of all constr. vars. diff --git a/SCons/Platform/__init__.py b/SCons/Platform/__init__.py index b6a7b97..20048ee 100644 --- a/SCons/Platform/__init__.py +++ b/SCons/Platform/__init__.py @@ -56,9 +56,9 @@ import SCons.Tool def platform_default(): - """Return the platform string for our execution environment. + r"""Return the platform string for our execution environment. - The returned value should map to one of the SCons/Platform/\*.py + The returned value should map to one of the SCons/Platform/*.py files. Since scons is architecture independent, though, we don't care about the machine architecture. """ @@ -131,19 +131,19 @@ class PlatformSpec: class TempFileMunge: - """A callable class. You can set an Environment variable to this, + """A callable class to enable temp files for long command lines. + + You can set an Environment variable to this, then call it with a string argument, then it will perform temporary file substitution on it. This is used to circumvent the long command - line limitation. - - Example: + line limitation. Example:: env["TEMPFILE"] = TempFileMunge env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES','$LINKCOMSTR')}" By default, the name of the temporary file used begins with a prefix of '@'. This may be configured for other tool chains by - setting '$TEMPFILEPREFIX'. Example: + setting '$TEMPFILEPREFIX'. Example:: env["TEMPFILEPREFIX"] = '-@' # diab compiler env["TEMPFILEPREFIX"] = '-via' # arm tool chain @@ -151,9 +151,10 @@ class TempFileMunge: You can configure the extension of the temporary file through the TEMPFILESUFFIX variable, which defaults to '.lnk' (see comments - in the code below). Example: + in the code below). Example:: env["TEMPFILESUFFIX"] = '.lnt' # PC Lint + """ def __init__(self, cmd, cmdstr = None): self.cmd = cmd diff --git a/SCons/Script/SConsOptions.py b/SCons/Script/SConsOptions.py index 5d61e32..9d5fb47 100644 --- a/SCons/Script/SConsOptions.py +++ b/SCons/Script/SConsOptions.py @@ -347,8 +347,8 @@ class SConsOptionParser(optparse.OptionParser): below. When called from there, we try to reparse the command-line arguments that: - 1. haven't been processed so far (self.largs), but - 2. are possibly not added to the list of options yet. + 1. haven't been processed so far (self.largs), but + 2. are possibly not added to the list of options yet. So, when we only have a value for "--myargument" yet, a command-line argument of "--myarg=test" would set it. diff --git a/SCons/dblite.py b/SCons/dblite.py index b9269f1..338dcc7 100644 --- a/SCons/dblite.py +++ b/SCons/dblite.py @@ -37,6 +37,7 @@ class dblite: See the discussion at: http://mail.python.org/pipermail/python-bugs-list/2003-March/016877.html + """ _open = open diff --git a/doc/sphinx/SCons.rst b/doc/sphinx/SCons.rst index c92b957..b9959e3 100644 --- a/doc/sphinx/SCons.rst +++ b/doc/sphinx/SCons.rst @@ -81,22 +81,6 @@ SCons.Environment module :undoc-members: :show-inheritance: -SCons.EnvironmentValues module ------------------------------- - -.. automodule:: SCons.EnvironmentValues - :members: - :undoc-members: - :show-inheritance: - -SCons.EnvironmentValuesTest module ----------------------------------- - -.. automodule:: SCons.EnvironmentValuesTest - :members: - :undoc-members: - :show-inheritance: - SCons.Errors module ------------------- diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 474f765..bfd7057 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -40,7 +40,8 @@ extensions = [ 'sphinx.ext.viewcode', ] -autodoc_default_flags = [":members:", ":undoc-members:", ":show-inheritance:"] +autosummary_generate = True + autodoc_default_options = { "members": True, "special-members": True, -- cgit v0.12 From 7ea666723c18c7fbd13fe282697591a0a2fd26d2 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 27 May 2020 12:10:44 -0600 Subject: More sphinx build tweaks [ci skip] Signed-off-by: Mats Wichmann --- SCons/Environment.py | 39 ++++++++++++++++++++++++--------------- SCons/Script/SConsOptions.py | 2 +- SCons/Variables/__init__.py | 43 +++++++++++++++++++++++++------------------ doc/sphinx/conf.py | 2 +- 4 files changed, 51 insertions(+), 35 deletions(-) diff --git a/SCons/Environment.py b/SCons/Environment.py index 28906ea..188631e 100644 --- a/SCons/Environment.py +++ b/SCons/Environment.py @@ -1500,13 +1500,18 @@ class Base(SubstitutionEnvironment): def Dictionary(self, *args): - r"""Return construction variables from an environment. + """Return construction variables from an environment. - :param args: (optional) variable names to look up - :returns: if args omitted, the dictionary of all constr. vars. - If one arg, the corresponding value is returned. - If more than one arg, a list of values is returned. - :raises KeyError: if any of args is not in the construction env. + Args: + args: (optional) variable names to look up + + Returns: + if args omitted, the dictionary of all consvars. + If one arg, the corresponding value is returned. + If more than one arg, a list of values is returned. + + Raises: + KeyError: if any of args is not in the construction env. """ if not args: @@ -1520,12 +1525,13 @@ class Base(SubstitutionEnvironment): def Dump(self, key=None, format='pretty'): """ Serialize the construction variables to a string. - :param key: if None, format the whole dict of variables. - Else look up and format just the value for key. - - :param format: specify the format of the variables to be serialized: + Args: + key: if None, format the whole dict of variables. + Else format just the value for key (Default value = None) + format: specify the format of the variables to be serialized: - pretty: pretty-printed string. - json: JSON-formatted string. + (Default value = None) """ if key: @@ -1556,12 +1562,15 @@ class Base(SubstitutionEnvironment): def FindIxes(self, paths, prefix, suffix): - """ - Search a list of paths for something that matches the prefix and suffix. + """Search a list of paths for something that matches the prefix and suffix. + + Args: + paths: the list of paths or nodes. + prefix: construction variable for the prefix. + suffix: construction variable for the suffix. + + Returns: the matched path or None - paths - the list of paths or nodes. - prefix - construction variable for the prefix. - suffix - construction variable for the suffix. """ suffix = self.subst('$'+suffix) diff --git a/SCons/Script/SConsOptions.py b/SCons/Script/SConsOptions.py index 9d5fb47..ffd3c4a 100644 --- a/SCons/Script/SConsOptions.py +++ b/SCons/Script/SConsOptions.py @@ -345,7 +345,7 @@ class SConsOptionParser(optparse.OptionParser): Else, this would lead to problems in add_local_option() below. When called from there, we try to reparse the - command-line arguments that: + command-line arguments that 1. haven't been processed so far (self.largs), but 2. are possibly not added to the list of options yet. diff --git a/SCons/Variables/__init__.py b/SCons/Variables/__init__.py index 59b63eb..832ee58 100644 --- a/SCons/Variables/__init__.py +++ b/SCons/Variables/__init__.py @@ -49,16 +49,22 @@ class Variables: Holds all the options, updates the environment with the variables, and renders the help text. """ - instance=None + instance = None - def __init__(self, files=None, args=None, is_global=1): - """ - files - [optional] List of option configuration files to load - (backward compatibility) If a single string is passed it is - automatically placed in a file list - args - dictionary to override values set from files. - """ + def __init__(self, files=None, args=None, is_global=True): + """Create Variables instance. + + If is_global is True, this is a singleton, create only once. + + Args: + files: [optional] List of option configuration files to load + (backward compatibility). If a single string is passed it is + automatically placed in a file list (Default value = None) + args - dictionary to override values set from files. + (Default value = None) + is_global - global instance? (Default value = True) + """ if args is None: args = {} self.options = [] @@ -112,18 +118,19 @@ class Variables: return [o.key for o in self.options] def Add(self, key, help="", default=None, validator=None, converter=None, **kw): - """ - Add an option. + """Add an option. + + Args: + key: the name of the variable, or a list or tuple of arguments + help: optional help text for the options (Default value = "") + default: optional default value for option (Default value = None) + validator: optional function called to validate the option's value + (Default value = None) + converter: optional function to be called to convert the option's + value before putting it in the environment. (Default value = None) + kw: keyword args, unused. - - @param key: the name of the variable, or a list or tuple of arguments - @param help: optional help text for the options - @param default: optional default value - @param validator: optional function that is called to validate the option's value - @type validator: Called with (key, value, environment) - @param converter: optional function that is called to convert the option's value before putting it in the environment. """ - if SCons.Util.is_List(key) or isinstance(key, tuple): self._do_add(*key) return diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index bfd7057..141d089 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -19,7 +19,7 @@ # import os import sys -sys.path.insert(0, os.path.abspath('../../src/engine/')) +sys.path.insert(0, os.path.abspath('../../')) # -- General configuration ------------------------------------------------ -- cgit v0.12 From be613a49ef4e12b5b71b6ba1238e6762f29878cd Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 28 May 2020 08:49:38 -0600 Subject: sphinx build: drop special members [ci skip] Opinion time - when special members are included in the docs, the output isn't really readable, it's too cluttered. Don't seem to be able to get the autoclasstoc stuff working, which was supposed to help with that. Signed-off-by: Mats Wichmann --- SCons/Environment.py | 2 +- doc/sphinx/conf.py | 4 ++-- doc/sphinx/index.rst | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/SCons/Environment.py b/SCons/Environment.py index 188631e..c30a661 100644 --- a/SCons/Environment.py +++ b/SCons/Environment.py @@ -1527,7 +1527,7 @@ class Base(SubstitutionEnvironment): Args: key: if None, format the whole dict of variables. - Else format just the value for key (Default value = None) + Else format just the value for key (Default value = None) format: specify the format of the variables to be serialized: - pretty: pretty-printed string. - json: JSON-formatted string. diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 141d089..21a982f 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -44,14 +44,14 @@ autosummary_generate = True autodoc_default_options = { "members": True, - "special-members": True, + #"special-members": True, "private-members": True, "inherited-members": True, "undoc-members": True, "exclude-members": '__weakref__', } autodoc_exclude_members = ['*Tests'] -napoleon_include_special_with_doc = True +napoleon_include_special_with_doc = False napoleon_include_private_with_doc = True # Add any paths that contain templates here, relative to this directory. diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index eec3750..6828154 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -6,6 +6,15 @@ SCons Project API Documentation =============================== +This is the internal API Documentation for SCons. +The Documentation is generated using the Sphinx tool. +The target audience is developers working on SCons itself, +so it does not clearly delineate what is "Public API" - +interfaces for use in your SCons configuration scripts +which have a consistency guarantee, and what is internal, +so always keep the SCons manual page around for helping +with such determinations. + .. toctree:: :maxdepth: 2 :caption: Contents: -- cgit v0.12 From 261f1d187b92adfbe262e0fad394743c8c0f80be Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 30 May 2020 08:13:35 -0600 Subject: sphinx build: move docstring changes to own PR [ci skip] Split this patchset so it contains only the Sphinx-build configuration itself, and not any docstring changes suggested by running Sphinx. Signed-off-by: Mats Wichmann --- SCons/Environment.py | 39 +++++++++++++++------------------------ SCons/Errors.py | 7 +++++-- SCons/Platform/__init__.py | 18 +++++++----------- SCons/Script/SConsOptions.py | 6 ++---- SCons/Tool/dmd.py | 35 ++++++++++++----------------------- SCons/Tool/intelc.py | 14 +++++++------- SCons/Tool/packaging/rpm.py | 22 ++++++++++------------ SCons/Util.py | 27 +++++++++++---------------- SCons/Variables/__init__.py | 43 ++++++++++++++++++------------------------- SCons/cpp.py | 3 ++- SCons/dblite.py | 1 - 11 files changed, 89 insertions(+), 126 deletions(-) diff --git a/SCons/Environment.py b/SCons/Environment.py index c30a661..cd52ee5 100644 --- a/SCons/Environment.py +++ b/SCons/Environment.py @@ -1502,16 +1502,11 @@ class Base(SubstitutionEnvironment): def Dictionary(self, *args): """Return construction variables from an environment. - Args: - args: (optional) variable names to look up - - Returns: - if args omitted, the dictionary of all consvars. - If one arg, the corresponding value is returned. - If more than one arg, a list of values is returned. - - Raises: - KeyError: if any of args is not in the construction env. + :param *args: (optional) variable names to look up + :returns: if args omitted, the dictionary of all constr. vars. + If one arg, the corresponding value is returned. + If more than one arg, a list of values is returned. + :raises KeyError: if any of *args is not in the construction env. """ if not args: @@ -1525,13 +1520,12 @@ class Base(SubstitutionEnvironment): def Dump(self, key=None, format='pretty'): """ Serialize the construction variables to a string. - Args: - key: if None, format the whole dict of variables. - Else format just the value for key (Default value = None) - format: specify the format of the variables to be serialized: + :param key: if None, format the whole dict of variables. + Else look up and format just the value for key. + + :param format: specify the format of the variables to be serialized: - pretty: pretty-printed string. - json: JSON-formatted string. - (Default value = None) """ if key: @@ -1562,15 +1556,12 @@ class Base(SubstitutionEnvironment): def FindIxes(self, paths, prefix, suffix): - """Search a list of paths for something that matches the prefix and suffix. - - Args: - paths: the list of paths or nodes. - prefix: construction variable for the prefix. - suffix: construction variable for the suffix. - - Returns: the matched path or None + """ + Search a list of paths for something that matches the prefix and suffix. + paths - the list of paths or nodes. + prefix - construction variable for the prefix. + suffix - construction variable for the suffix. """ suffix = self.subst('$'+suffix) @@ -2026,7 +2017,7 @@ class Base(SubstitutionEnvironment): pass else: del kw['target_factory'] - + bld = SCons.Builder.Builder(**bkw) return bld(self, target, source, **kw) diff --git a/SCons/Errors.py b/SCons/Errors.py index 882ae82..a3a891f 100644 --- a/SCons/Errors.py +++ b/SCons/Errors.py @@ -35,11 +35,13 @@ import SCons.Util class BuildError(Exception): - """SCons Errors that can occur while building. + """ Errors occurring while building. - BuildError has the following attributes: + BuildError have the following attributes: + ========================================= Information about the cause of the build error: + ----------------------------------------------- errstr : a description of the error message @@ -69,6 +71,7 @@ class BuildError(Exception): Information about the cause of the location of the error: + --------------------------------------------------------- node : the error occured while building this target node(s) diff --git a/SCons/Platform/__init__.py b/SCons/Platform/__init__.py index 20048ee..12db824 100644 --- a/SCons/Platform/__init__.py +++ b/SCons/Platform/__init__.py @@ -56,10 +56,10 @@ import SCons.Tool def platform_default(): - r"""Return the platform string for our execution environment. + """Return the platform string for our execution environment. The returned value should map to one of the SCons/Platform/*.py - files. Since scons is architecture independent, though, we don't + files. Since we're architecture independent, though, we don't care about the machine architecture. """ osname = os.name @@ -131,30 +131,26 @@ class PlatformSpec: class TempFileMunge: - """A callable class to enable temp files for long command lines. - - You can set an Environment variable to this, + """A callable class. You can set an Environment variable to this, then call it with a string argument, then it will perform temporary file substitution on it. This is used to circumvent the long command - line limitation. Example:: + line limitation. + Example usage: env["TEMPFILE"] = TempFileMunge env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES','$LINKCOMSTR')}" By default, the name of the temporary file used begins with a prefix of '@'. This may be configured for other tool chains by - setting '$TEMPFILEPREFIX'. Example:: - + setting '$TEMPFILEPREFIX': env["TEMPFILEPREFIX"] = '-@' # diab compiler env["TEMPFILEPREFIX"] = '-via' # arm tool chain env["TEMPFILEPREFIX"] = '' # (the empty string) PC Lint You can configure the extension of the temporary file through the TEMPFILESUFFIX variable, which defaults to '.lnk' (see comments - in the code below). Example:: - + in the code below): env["TEMPFILESUFFIX"] = '.lnt' # PC Lint - """ def __init__(self, cmd, cmdstr = None): self.cmd = cmd diff --git a/SCons/Script/SConsOptions.py b/SCons/Script/SConsOptions.py index ffd3c4a..10600b6 100644 --- a/SCons/Script/SConsOptions.py +++ b/SCons/Script/SConsOptions.py @@ -346,9 +346,8 @@ class SConsOptionParser(optparse.OptionParser): Else, this would lead to problems in add_local_option() below. When called from there, we try to reparse the command-line arguments that - - 1. haven't been processed so far (self.largs), but - 2. are possibly not added to the list of options yet. + 1. haven't been processed so far (self.largs), but + 2. are possibly not added to the list of options yet. So, when we only have a value for "--myargument" yet, a command-line argument of "--myarg=test" would set it. @@ -356,7 +355,6 @@ class SConsOptionParser(optparse.OptionParser): _match_long_opt(), which allows for partial matches of the option name, as long as the common prefix appears to be unique. - This would lead to further confusion, because we might want to add another option "--myarg" later on (see issue #2929). diff --git a/SCons/Tool/dmd.py b/SCons/Tool/dmd.py index 32b9c02..3cc4ed0 100644 --- a/SCons/Tool/dmd.py +++ b/SCons/Tool/dmd.py @@ -10,33 +10,22 @@ Evolved by Russel Winder (russel@winder.org.uk) 2010-02-07 onwards Compiler variables: - - DC - The name of the D compiler to use. Defaults to dmd or gdmd, whichever is found. - DPATH - List of paths to search for import modules. - DVERSIONS - List of version tags to enable when compiling. - DDEBUG - List of debug tags to enable when compiling. + DC - The name of the D compiler to use. Defaults to dmd or gdmd, + whichever is found. + DPATH - List of paths to search for import modules. + DVERSIONS - List of version tags to enable when compiling. + DDEBUG - List of debug tags to enable when compiling. Linker related variables: - - LIBS - List of library files to link in. - DLINK - Name of the linker to use. Defaults to dmd or gdmd, whichever is found. - DLINKFLAGS - List of linker flags. + LIBS - List of library files to link in. + DLINK - Name of the linker to use. Defaults to dmd or gdmd, + whichever is found. + DLINKFLAGS - List of linker flags. Lib tool variables: - - DLIB - Name of the lib tool to use. Defaults to lib. - DLIBFLAGS - List of flags to pass to the lib tool. - LIBS - Same as for the linker. (libraries to pull into the .lib) + DLIB - Name of the lib tool to use. Defaults to lib. + DLIBFLAGS - List of flags to pass to the lib tool. + LIBS - Same as for the linker. (libraries to pull into the .lib) """ # diff --git a/SCons/Tool/intelc.py b/SCons/Tool/intelc.py index 2242e60..0880976 100644 --- a/SCons/Tool/intelc.py +++ b/SCons/Tool/intelc.py @@ -387,13 +387,13 @@ def get_intel_compiler_top(version, abi): def generate(env, version=None, abi=None, topdir=None, verbose=0): r"""Add Builders and construction variables for Intel C/C++ compiler to an Environment. - - :param string version: compiler version to use, like "80" - :param string abi: 'win32' or whatever Itanium version wants - :param string topdir: directory containing compiler tree, e.g. - "c:\\Program Files\\Intel\\Compiler70". - If `topdir` is used, `version` and `abi` are ignored. - :param int verbose: if >0, prints compiler version used. + args: + version: (string) compiler version to use, like "80" + abi: (string) 'win32' or whatever Itanium version wants + topdir: (string) compiler top dir, like + "c:\Program Files\Intel\Compiler70" + If topdir is used, version and abi are ignored. + verbose: (int) if >0, prints compiler version used. """ if not (is_mac or is_linux or is_windows): # can't handle this platform diff --git a/SCons/Tool/packaging/rpm.py b/SCons/Tool/packaging/rpm.py index 9e2bbb0..0e44bf9 100644 --- a/SCons/Tool/packaging/rpm.py +++ b/SCons/Tool/packaging/rpm.py @@ -302,23 +302,21 @@ def build_specfile_filesection(spec, files): return str class SimpleTagCompiler: - """ Compile RPM tags by doing simple string substitution. + """ This class is a simple string substition utility: + the replacement specfication is stored in the tagset dictionary, something + like: + { "abc" : "cdef %s ", + "abc_" : "cdef %s %s" } - The replacement specfication is stored in the *tagset* dictionary, - something like: - - {"abc" : "cdef %s ", "abc_": "cdef %s %s"} - - The :func:`compile` function gets a value dictionary, which may look like: - - {"abc": "ghij", "abc_gh": "ij"} + the compile function gets a value dictionary, which may look like: + { "abc" : "ghij", + "abc_gh" : "ij" } The resulting string will be: - - "cdef ghij cdef gh ij" + "cdef ghij cdef gh ij" """ def __init__(self, tagset, mandatory=1): - self.tagset = tagset + self.tagset = tagset self.mandatory = mandatory def compile(self, values): diff --git a/SCons/Util.py b/SCons/Util.py index effe4c4..1ec0cf8 100644 --- a/SCons/Util.py +++ b/SCons/Util.py @@ -1611,18 +1611,16 @@ def cmp(a, b): def get_env_bool(env, name, default=False): - """Convert a construction variable to bool. - - If the value of *name* in *env* is 'true', 'yes', 'y', 'on' (case - insensitive) or anything convertible to int that yields non-zero then - return True; if 'false', 'no', 'n', 'off' (case insensitive) - or a number that converts to integer zero return False. - Otherwise, return *default*. - - :param env: construction environment, or any dict-like object - :param name: name of the variable - :param default: value to return if name not in env or cannot be converted (default: False) - :rtype: bool + """Get a value of env[name] converted to boolean. The value of env[name] is + interpreted as follows: 'true', 'yes', 'y', 'on' (case insensitive) and + anything convertible to int that yields non-zero integer are True values; + '0', 'false', 'no', 'n' and 'off' (case insensitive) are False values. For + all other cases, default value is returned. + + :Parameters: + - `env` - dict or dict-like object, a convainer with variables + - `name` - name of the variable in env to be returned + - `default` - returned when env[name] does not exist or can't be converted to bool """ try: var = env[name] @@ -1640,10 +1638,7 @@ def get_env_bool(env, name, default=False): def get_os_env_bool(name, default=False): - """Convert an environment variable to bool. - - Conversion is the same as for :func:`get_env_bool`. - """ + """Same as get_env_bool(os.environ, name, default).""" return get_env_bool(os.environ, name, default) # Local Variables: diff --git a/SCons/Variables/__init__.py b/SCons/Variables/__init__.py index 832ee58..59b63eb 100644 --- a/SCons/Variables/__init__.py +++ b/SCons/Variables/__init__.py @@ -49,22 +49,16 @@ class Variables: Holds all the options, updates the environment with the variables, and renders the help text. """ - instance = None - - def __init__(self, files=None, args=None, is_global=True): - """Create Variables instance. - - If is_global is True, this is a singleton, create only once. - - Args: - files: [optional] List of option configuration files to load - (backward compatibility). If a single string is passed it is - automatically placed in a file list (Default value = None) - args - dictionary to override values set from files. - (Default value = None) - is_global - global instance? (Default value = True) + instance=None + def __init__(self, files=None, args=None, is_global=1): + """ + files - [optional] List of option configuration files to load + (backward compatibility) If a single string is passed it is + automatically placed in a file list + args - dictionary to override values set from files. """ + if args is None: args = {} self.options = [] @@ -118,19 +112,18 @@ class Variables: return [o.key for o in self.options] def Add(self, key, help="", default=None, validator=None, converter=None, **kw): - """Add an option. - - Args: - key: the name of the variable, or a list or tuple of arguments - help: optional help text for the options (Default value = "") - default: optional default value for option (Default value = None) - validator: optional function called to validate the option's value - (Default value = None) - converter: optional function to be called to convert the option's - value before putting it in the environment. (Default value = None) - kw: keyword args, unused. + """ + Add an option. + + @param key: the name of the variable, or a list or tuple of arguments + @param help: optional help text for the options + @param default: optional default value + @param validator: optional function that is called to validate the option's value + @type validator: Called with (key, value, environment) + @param converter: optional function that is called to convert the option's value before putting it in the environment. """ + if SCons.Util.is_List(key) or isinstance(key, tuple): self._do_add(*key) return diff --git a/SCons/cpp.py b/SCons/cpp.py index 0811c71..1113be5 100644 --- a/SCons/cpp.py +++ b/SCons/cpp.py @@ -603,7 +603,8 @@ class PreProcessor: This handles recursive expansion of values without "" or <> surrounding the name until an initial " or < is found, to handle - #include FILE where FILE is a #define somewhere else. + #include FILE + where FILE is a #define somewhere else. """ s = t[1].strip() while not s[0] in '<"': diff --git a/SCons/dblite.py b/SCons/dblite.py index 338dcc7..b9269f1 100644 --- a/SCons/dblite.py +++ b/SCons/dblite.py @@ -37,7 +37,6 @@ class dblite: See the discussion at: http://mail.python.org/pipermail/python-bugs-list/2003-March/016877.html - """ _open = open -- cgit v0.12