From fdec34d744e03361bb177b171359c4e3e5d23f35 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 27 Jun 2008 02:25:34 +0200 Subject: Generate pydoc docs --- src/Makefile-files | 18 +++++++++++++++++- src/nbblib/__init__.py | 2 +- src/nbblib/commands.py | 5 +++++ src/nbblib/main.py | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Makefile-files b/src/Makefile-files index 6707adc..a397c8d 100644 --- a/src/Makefile-files +++ b/src/Makefile-files @@ -15,7 +15,7 @@ nbblib_PYTHON += src/nbblib/vcs.py # Put all python source files, whether changed or verbatim, # into builddir, such that we can run tests in builddir. -all-local: all-local-nbblib +ALL_LOCAL += all-local-nbblib all-local-nbblib: @for f in $(nbblib_PYTHON); do \ if test -f "$(top_builddir)/$$f" && test "$(top_srcdir)/$$f" -ot "$(top_builddir)/$$f"; then :; else \ @@ -24,6 +24,22 @@ all-local-nbblib: fi; \ done +if HAVE_PYDOC +ALL_LOCAL += all-local-nbblib-pydoc +all-local-nbblib-pydoc: all-local-nbblib + @cd src && \ + echo "Entering directory '$$PWD'"; \ + echo $(PYDOC) -w "nbblib"; \ + $(PYDOC) -w "nbblib"; \ + for modfile in nbblib/*.py; do \ + mod="nbblib.$$(basename "$$modfile" .py)"; \ + test "$$mod" = "nbblib.__init__" && continue; \ + echo $(PYDOC) -w "$${mod}"; \ + $(PYDOC) -w "$${mod}"; \ + done; \ + echo "Leaving directory '$$PWD'"; +endif + bin_SCRIPTS += src/nbb CLEANFILES += src/nbb diff --git a/src/nbblib/__init__.py b/src/nbblib/__init__.py index 5f4a254..47b0375 100644 --- a/src/nbblib/__init__.py +++ b/src/nbblib/__init__.py @@ -5,7 +5,7 @@ import nbblib.package as package import nbblib.progutils as progutils import nbblib.vcs as vcs -from package import PACKAGE_VERSION +from nbblib.package import PACKAGE_VERSION __all__ = ['bs', 'commands', 'package', 'plugins', diff --git a/src/nbblib/commands.py b/src/nbblib/commands.py index 861b8ba..7ef444b 100644 --- a/src/nbblib/commands.py +++ b/src/nbblib/commands.py @@ -1,3 +1,8 @@ +"""\ +nbblib.commands - cmdline command infrastructure and implementation +Copyright (C) 2008 Hans Ulrich Niedermann +""" + import os import sys import logging diff --git a/src/nbblib/main.py b/src/nbblib/main.py index 6e5d6d5..46dbd41 100644 --- a/src/nbblib/main.py +++ b/src/nbblib/main.py @@ -28,6 +28,7 @@ DONE: and then check that the Python environment is actually compatible. @classmethod -> Python 2.4 new style classes -> Python 2.2 + * Add pydoc docs. TODO: (to get git-amb equivalent functionality) * Fine-tune init, configure, build, install commands with knowledge @@ -45,7 +46,6 @@ TODO: (Large list) * Use declarations for command line parsing, and help text generation. Use optparse stuff for both global params and extra optparse stuff for each command? - * Add pydoc docs. * Add global --nick or similar option to determine the branch name to use for composing the pathes. * Find or implement @abstractmethod decorator. -- cgit