X-Git-Url: https://git.rkrishnan.org/?a=blobdiff_plain;f=setuptools-0.6c16dev5.egg%2Fpkg_resources.py;h=52ce472f8ada2e24f60188459c8c49a3907bb510;hb=575d7a20a9c9c4cc839c8fb094055dc04177f290;hp=a94d89f8472d07ad24a25c2c39238e88fd5942f4;hpb=53ced4be8be6dbbba82e74e9acb851f90b552588;p=tahoe-lafs%2Ftahoe-lafs.git diff --git a/setuptools-0.6c16dev5.egg/pkg_resources.py b/setuptools-0.6c16dev5.egg/pkg_resources.py index a94d89f8..52ce472f 100644 --- a/setuptools-0.6c16dev5.egg/pkg_resources.py +++ b/setuptools-0.6c16dev5.egg/pkg_resources.py @@ -529,14 +529,19 @@ class WorkingSet(object): # If we have a __requires__ then we can already tell if this # dist is unsatisfactory, in which case we won't add it. if __requires__ is not None: - for thisreqstr in __requires__: + if isinstance(__requires__, basestring): + array_of__requires__ = [__requires__] + else: + array_of__requires__ = __requires__ + + for thisreqstr in array_of__requires__: try: for thisreq in parse_requirements(thisreqstr): if thisreq.key == dist.key: if dist not in thisreq: return except ValueError, e: - e.args = tuple(e.args + ({'thisreqstr': thisreqstr},)) + e.args = tuple(e.args + ({'thisreqstr': thisreqstr, '__requires__': __requires__},)) raise self.by_key[dist.key] = dist