I wanted to see how the Widget Browser, and finding it short, I wanted
to see if installed ToscaWidgets could be loaded in the same way. I can
obtain the list, but load() the widget modules, starting with
toscawidgets.widgets.forms fails setuptools Requirement.parse:

----
In [1]: import pkg_resources

In [2]: for widget_mod in
pkg_resources.iter_entry_points("toscawidgets.widgets"): print
widget_mod
   ...:
forms = toscawidgets.widgets.forms
jquery = toscawidgets.widgets.jquery
mochikit = toscawidgets.widgets.mochikit
tinymce = toscawidgets.widgets.tinymce

In [3]: for widget_mod in
pkg_resources.iter_entry_points("toscawidgets.widgets"):
widget_mod.load()
   ...:
---------------------------------------------------------------------------
pkg_resources.VersionConflict                           Traceback (most
recent call last)

/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/pkg_resources.py
in load(self, require, env, installer)
   1827
   1828     def load(self, require=True, env=None, installer=None):
-> 1829         if require: self.require(env, installer)
   1830         entry = __import__(self.module_name,
globals(),globals(), ['__name__'])
   1831         for attr in self.attrs:

/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/pkg_resources.py
in require(self, env, installer)
   1840             raise UnknownExtra("Can't require() without a
distribution", self)
   1841         map(working_set.add,
-> 1842
working_set.resolve(self.dist.requires(self.extras),env,installer))
   1843
   1844

/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/pkg_resources.py
in resolve(self, requirements, env, installer)
    485             if dist not in req:
    486                 # Oops, the "best" so far conflicts with a
dependency
--> 487                 raise VersionConflict(dist,req) # XXX put more
info here
    488
requirements.extend(dist.requires(req.extras)[::-1])
    489             processed[req] = True

VersionConflict: (ToscaWidgets 0.1a1dev-r2403
(/software/svn/ToscaWidgets), Requirement.parse('ToscaWidgets>=0.1a1'))
----

Is this a quirk of the dev-rN version unseparated suffix employed by
ToscaWidgets? It seems to a convention in common use, but I don't know
whether setuptools' version name conventions are expected evaluate this
name to 'greater than'. I don't think there would be any problem with
the released 0.1a1.

Thanks, I'll file a bug if this is something valid that should be fixed.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to