viff

changeset 727:036c28e36895

Rename environment variable from EPYDOC to VIFF_NO_WRAP.
author Martin Geisler <mg@daimi.au.dk>
date Thu, 24 Apr 2008 13:13:22 +0200
parents 5fee3ab4741d
children fa33d8c71256
files run.py viff/util.py
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line diff
     1.1 --- a/run.py	Thu Apr 24 11:56:34 2008 +0200
     1.2 +++ b/run.py	Thu Apr 24 13:13:22 2008 +0200
     1.3 @@ -126,7 +126,7 @@
     1.4      target = "%s/api" % build
     1.5      ensure_dir(target)
     1.6      execute(["epydoc", "-vv", "--config", "epydoc.conf"],
     1.7 -            {'EPYDOC': 'YES', 'target': target})
     1.8 +            {'VIFF_NO_WRAP': 'YES', 'target': target})
     1.9  
    1.10  @command('coverage', 'build')
    1.11  def coverage(build):
     2.1 --- a/viff/util.py	Thu Apr 24 11:56:34 2008 +0200
     2.2 +++ b/viff/util.py	Thu Apr 24 13:13:22 2008 +0200
     2.3 @@ -64,18 +64,18 @@
     2.4      order to ensure that they end up with correct C{__name__} and
     2.5      C{__doc__} attributes.
     2.6  
     2.7 -    In addition, if the environment variable C{EPYDOC} is defined,
     2.8 -    then the wrapper functions will be turned into functions that I{do
     2.9 -    not} wrap -- instead they let their argument function through
    2.10 -    unchanged. This is done so that epydoc can see the true function
    2.11 -    arguments when generating documentation. Just remember that your
    2.12 -    code will break if C{EPYDOC} is set, so it should only be used
    2.13 -    when epydoc is being run.
    2.14 +    In addition, if the environment variable C{VIFF_NO_WRAP} is
    2.15 +    defined, then the wrapper functions will be turned into functions
    2.16 +    that I{do not} wrap -- instead they let their argument function
    2.17 +    through unchanged. This is done so that epydoc and Sphinx can see
    2.18 +    the true function arguments when generating documentation. Just
    2.19 +    remember that your code will break if C{VIFF_NO_WRAP} is set, so
    2.20 +    it should only be used when documentation is being generated.
    2.21  
    2.22      @param func: the function that will be wrapped.
    2.23      @type func: callable
    2.24      """
    2.25 -    if os.environ.get('EPYDOC'):
    2.26 +    if os.environ.get('VIFF_NO_WRAP'):
    2.27          # Return a decorator which ignores the functions it is asked
    2.28          # to decorate and instead returns func:
    2.29          return lambda _: func