mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-30 16:13:58 +00:00
Improve zetuptoolz' logging of what it is doing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
d29e956a0f
commit
f69c9f2a0e
@ -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
|
||||
|
@ -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:
|
||||
|
||||
<http://bugs.python.org/setuptools/issue17>
|
||||
|
Loading…
x
Reference in New Issue
Block a user