Le 27/4/2006, "Christopher Lenz" <[EMAIL PROTECTED]> a écrit:
>Hi all,
>
>I'm trying to specify an extra for an entry point, as follows:
>
> setup(
> ...
> extras_require = {
> 'DNS': ['dnspython>=1.3.5']
> },
> entry_points = {
> 'trac.plugins': [
> 'spamfilter = tracspamfilter.api',
> 'spamfilter.adapters = tracspamfilter.adapters',
> 'spamfilter.filters.akismet =
>tracspamfilter.filters.akismet',
> 'spamfilter.filters.ip_blacklist =
>tracspamfilter.filters.ip_blacklist [DNS]'
> ]
> },
> ...
> )
And if you try something like:
entry_points="""
# ...
spamfilter.filters.ip_blacklist = tracspamfilter.filters.ip_blacklist
[DNS]
"""
?
>
>egg_info then fails with the message:
>
> ValueError: ('Invalid module name',
>'tracspamfilter.filters.ip_blacklist ')
>
>Obviously the space between the module and the extras spec is messing
>up the parsing somehow, so I remove the space. Now, this works *only
>the first time* (i.e. before the entry_points.txt file) gets written
>out. Apparently setuptools also puts a space between the module name
>and the extras :-P
>
>Using setuptools 0.6a10... couldn't find anything related in the
>check-in messages.
>
>Am I missing something obvious here? Or isn't anyone actually using
>that particular feature yet?
>
I've used that feature, but using the string based syntax instead of the
dictionary. And it worked.
>Anyway, replacing "value.lstrip()" with "value.strip()" in
>EntryPoint.parse() appears to fix this.
>
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig