From: Daira Hopwood Date: Thu, 2 Oct 2014 00:33:49 +0000 (+0100) Subject: Improve zetuptoolz' logging of what it is doing. X-Git-Tag: allmydata-tahoe-1.10.1a1~126 X-Git-Url: https://git.rkrishnan.org/frontends/simplejson/nxhtml.html?a=commitdiff_plain;h=f69c9f2a0e851d33c8f6f96955a69d973f495997;p=tahoe-lafs%2Ftahoe-lafs.git Improve zetuptoolz' logging of what it is doing. Signed-off-by: Daira Hopwood --- diff --git a/setuptools-0.6c16dev4.egg/pkg_resources.py b/setuptools-0.6c16dev4.egg/pkg_resources.py index 3dbdec14..36ec57ad 100644 --- a/setuptools-0.6c16dev4.egg/pkg_resources.py +++ b/setuptools-0.6c16dev4.egg/pkg_resources.py @@ -25,6 +25,8 @@ from os import utime, rename, unlink, mkdir from os import open as os_open from os.path import isdir, split +from distutils import log + def _bypass_ensure_directory(name, mode=0777): # Sandbox-bypassing version of ensure_directory() dirname, filename = split(name) @@ -565,7 +567,9 @@ class WorkingSet(object): req = requirements.pop(0) # process dependencies breadth-first if req in processed: # Ignore cyclic or redundant dependencies + log.info("\nAlready processed %s", req) continue + log.info("\nNeed %s", req) dist = best.get(req.key) if dist is None: # Find the best distribution and add it to the map @@ -576,11 +580,19 @@ class WorkingSet(object): dist = best[req.key] = env.best_match(req, self, installer) if dist is None: raise DistributionNotFound(req) # XXX put more info here + log.info(" found %r", dist) to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency raise VersionConflict(dist,req) # XXX put more info here - requirements.extend(dist.requires(req.extras)[::-1]) + to_add = dist.requires(req.extras)[::-1] + if len(to_add) == 0: + log.info(" no subdependencies to add") + elif len(to_add) == 1: + log.info(" adding subdependency %s", "; ".join(map(str, to_add))) + else: + log.info(" adding subdependencies %s", "; ".join(map(str, to_add))) + requirements.extend(to_add) processed[req] = True return to_activate # return list of distros to activate diff --git a/setuptools-0.6c16dev4.egg/zetuptoolz.txt b/setuptools-0.6c16dev4.egg/zetuptoolz.txt index b4729c7f..469e262c 100644 --- a/setuptools-0.6c16dev4.egg/zetuptoolz.txt +++ b/setuptools-0.6c16dev4.egg/zetuptoolz.txt @@ -1,8 +1,11 @@ This is the "zetuptoolz" fork of setuptools. This version is forked from -setuptools trunk r80621 (which is current as of 2010-08-31), with the following +setuptools trunk r80621 (which was current at 2010-08-31), with the following differences: + * Logging outputs more information about which dependencies are being processed. + + * Zooko's and David-Sarah's patches for the following bugs and features have been applied: