Commits

Tyler Wade committed 218c7d3

Move documentation for ffi.verify() arguments

  • Participants
  • Parent commits 184ddf1

Comments (0)

Files changed (1)

File doc/source/index.rst

 compatibility and must be called several times to open several shared
 libraries.
 
+
 On top of CPython, the new library is actually a CPython C extension
 module.
 
    the distutils documentation for `more information about the other
    arguments`__.
 
+*  ``tmpdir``: controls where the C files are created and compiled.  By
+   default it is ``directory_containing_the_py_file/__pycache__``,
+   using the directory name of the .py file that contains the actual call to
+   ``ffi.verify()``.  (This is a bit of a hack but is generally
+   consistent with the location of the .pyc files for your library.
+   The name ``__pycache__`` itself comes from Python 3.)  *New in version 0.4.*
+
+   .. "versionadded:: 0.4" --- inlined in the previous paragraph
+
+*  ``ext_package``: controls in which package the
+   compiled extension module should be looked from.  This is
+   only useful after `distributing modules using CFFI`_.
+
+*  ``tag``: gives an extra string inserted in the
+   middle of the extension module's name: ``_cffi_<tag>_<hash>``.
+   Useful to give a bit more context, e.g. when debugging.
+
+*  ``modulename``: used to force a specific module
+   name, overriding the name ``_cffi_<tag>_<hash>``.  Use with care,
+   e.g. if you are passing variable information to ``verify()`` but
+   still want the module name to be always the same (e.g. absolute
+   paths to local files).  In this case, no hash is computed and if
+   the module name already exists it will be reused without further
+   check.  Be sure to have other means of clearing the ``tmpdir``
+   whenever you change your sources.  *New in version 0.5.*
+
+   .. "versionadded:: 0.5" --- inlined in the previous paragraph
+
 .. __: http://docs.python.org/distutils/setupscript.html#library-options
 .. _distutils: http://docs.python.org/distutils/setupscript.html#describing-extension-modules
 .. _`demo/_curses.py`: https://bitbucket.org/cffi/cffi/src/default/demo/_curses.py
 .. versionadded:: 0.4
    Unions used to crash ``verify()``.  Fixed.
 
-.. versionadded:: 0.4
-   The ``tmpdir`` argument to ``verify()`` controls where the C
-   files are created and compiled.  By default it is
-   ``directory_containing_the_py_file/__pycache__``, using the
-   directory name of the .py file that contains the actual call to
-   ``ffi.verify()``.  (This is a bit of a hack but is generally
-   consistent with the location of the .pyc files for your library.
-   The name ``__pycache__`` itself comes from Python 3.)
 
-   The ``ext_package`` argument controls in which package the
-   compiled extension module should be looked from.  This is
-   only useful after `distributing modules using CFFI`_.
-
-   The ``tag`` argument gives an extra string inserted in the
-   middle of the extension module's name: ``_cffi_<tag>_<hash>``.
-   Useful to give a bit more context, e.g. when debugging.
-
-.. _`warning about modulename`:
-
-.. versionadded:: 0.5
-   The ``modulename`` argument can be used to force a specific module
-   name, overriding the name ``_cffi_<tag>_<hash>``.  Use with care,
-   e.g. if you are passing variable information to ``verify()`` but
-   still want the module name to be always the same (e.g. absolute
-   paths to local files).  In this case, no hash is computed and if
-   the module name already exists it will be reused without further
-   check.  Be sure to have other means of clearing the ``tmpdir``
-   whenever you change your sources.
 
 This function returns a "library" object that gets closed when it goes
 out of scope.  Make sure you keep the library object around as long as
 - ``Verifier(ffi, preamble, tmpdir=.., ext_package='', modulename=None,
   tag='', **kwds)``:
   instantiate the class with an
-  FFI object and a preamble, which is C text that will be pasted into
-  the generated C source.  The value of ``tmpdir`` defaults to the
-  directory ``directory_of_the_caller/__pycache__``.  The value of
-  ``ext_package`` is used when looking up an already-compiled, already-
-  installed version of the extension module.  The module name is
-  ``_cffi_<tag>_<hash>``, unless overridden with ``modulename``
-  (see the `warning about modulename`_ above).
+  FFI object and a preamble, which is C text that will be pasted into the
+  generated C source.  ``tmpdir``, ``ext_package``, ``tag``, and ``modulename``
+  all have the same function as here as they do in ``ffi.verify()`` and are in
+  fact passed to the constructor when ``ffi.verify()`` is called. See 
+  `the verification step`_ for details.
   The other keyword arguments are passed directly
   to `distutils when building the Extension object.`__