I have a Windows 7 machine with Jython and Sphinx installed, including 
various environment variables and '.py' file associations to make Jython 
work. When documenting a single module which contains a single class using 
'make html' within the documentation directory I get the following warning: 
"WARNING: error while formatting arguments for [module_name]. Example: 
global name '__builtins__' is not defined"

My setup (each had to be installed manually because my Windows 7 machine is 
not connected to the internet):
- Jython 2.5.2 (so Python grammar 2.5.2)
- Jinja2 2.6
- docutils 0.11
- Pygments 1.6
- Sphinx 1.2.1

I had to rename the sphinx-* scripts in the Jython\bin directory so that 
they had the '.py' extension (Windows doesn't look for shebangs if there is 
no file extension on the script itself, although scripts with the file 
extension can be called without that extension if the extension is added to 
the PATHEXT environment variable)

The module:
class Example(object):
    """
    An example class.

    This class acts as a documentation example for testing auto-generation 
of documentation.
    """

    def __init__(self, a, b):
        pass

    def example_method(self, a, b):
        """
        An example method.

        This method acts as a documentation example as well.
        """
        pass


Process:
- Navigate to module's directory
- Create a 'doc' subdirectory
- Navigate to the 'doc' subdirectory
- Call 'sphinx-apidoc -F -o ./ ../' (works fine)
- Add 'sys.path.insert(1, r"absolute\path\to\module")' to conf.py
- Call 'make html'

Result:
The warning mentioned above, "...global name '__builtins__' is not defined"

Any idea what is causing this warning, and/or how to resolve it?

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to