The PEAK Developers' Center   Diff for "setuptools" UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View
Differences between version dated 2009-03-25 20:11:19 and 2009-10-20 10:09:23 (spanning 4 versions)
Deletions are marked like this.
Additions are marked like this.

 
``entry_points``
    A dictionary mapping entry point group names to strings or lists of strings
    defining the entry points. (Typically, the defining string would be the name of the module, a colon, and the name of the code, such as "mypackage.subpackage.module:func") Entry points are used to support dynamic
    defining the entry points. Entry points are used to support dynamic
    discovery of services or plugins provided by a project. See `Dynamic
    Discovery of Services and Plugins`_ for details and examples of the format
    of this argument. In addition, this keyword is used to support `Automatic

 
.. _Entry Points:
 
Dynamic Discovery of Services and Plugins (Entry Points)
--------------------------------------------------------
Dynamic Discovery of Services and Plugins
-----------------------------------------
 
``setuptools`` supports creating libraries that "plug in" to extensible
applications and frameworks, by letting you register "entry points" in your

If you're creating a project that plugs in to an existing application or
framework, you'll need to know what entry points or entry point groups are
defined by that application or framework. Then, you can register entry points
in your setup script. Here are a few examples of different ways you might register an
in your setup script. Here are a few examples of ways you might register an
``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group,
for our hypothetical blogging tool::
 
    # format: dict of entry_point_name:implementing_code_name
    setup(
        # ...
        entry_points = {'blogtool.parsers': '.rst = some_module:SomeClass'}
    )
 
    # format: dict of entry_point_name:list of names of implementing code
    setup(
        # ...
        entry_points = {'blogtool.parsers': ['.rst = some_module:a_func']}
    )
 
    # format: ini-style string.
    # This example also show usage of the optional "extras" reST
    setup(
        # ...
        entry_points = """

    this kind of patching to work with setuptools.
 
    If you or your users have a problem building a usable system package for
    your project, please report the problem via the `distutils-sig mailing list`_ so that
    your project, please report the problem via the `mailing list`_ so that
    either the "bdist" tool in question or setuptools can be modified to
    resolve the issue.
 

  inform the user of the missing program(s).
 
 
A Note Regarding Dependencies
-----------------------------
 
If the project *containing* your distutils/setuptools extension(s) depends on
any projects other than setuptools, you *must* also declare those dependencies
as part of your project's ``setup_requires`` keyword, so that they will
already be built (and at least temprorarily installed) before your extension
project is built.
 
So, if for example you create a project Foo that includes a new file finder
plugin, and Foo depends on Bar, then you *must* list Bar in both the
``install_requires`` **and** ``setup_requires`` arguments to ``setup()``.
 
If you don't do this, then in certain edge cases you may cause setuptools to
try to go into infinite recursion, trying to build your dependencies to resolve
your dependencies, while still building your dependencies. (It probably won't
happen on your development machine, but it *will* happen in a full build
pulling everything from revision control on a clean machine, and then you or
your users will be scratching their heads trying to figure it out!)
 
 
Subclassing ``Command``
-----------------------
 

Release Notes/Change History
----------------------------
 
0.6final
0.6c11
 * Fix "bdist_wininst upload" trying to upload same file twice
 
0.6c10
 * Fix for the Python 2.6.3 build_ext API change
 
 * Ensure C libraries (as opposed to extensions) are also built when doing
   bdist_egg
 
 * Support for SVN 1.6
 
0.6c9
 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

PythonPowered
ShowText of this page
EditText of this page
FindPage by browsing, title search , text search or an index
Or try one of these actions: AttachFile, DeletePage, LikePages, LocalSiteMap, SpellCheck