~doko/python/pkg3.3-debian

« back to all changes in this revision

Viewing changes to mincheck.py

  • Committer: Matthias Klose
  • Date: 2013-01-26 15:27:56 UTC
  • Revision ID: doko@ubuntu.com-20130126152756-wnuhawmmrt8sz0x2
python3.3 (3.3.0-10) experimental; urgency=low

  * Update to 20130126 from the 3.3 branch.
  * Update hurd patches.
  * python3.3-dbg, libpython3.3-dbg: Drop dependency on python.
  * python3.3-dbg: Make gdb (not gdb-minimal) a recommendation.
  * Git rid of build-dependency on python.
  * Add site-packages in virtual environments created by pyvenv.
    Closes: #698777.

 -- Matthias Klose <doko@debian.org>  Sat, 26 Jan 2013 12:17:05 +0100

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    t = eval(open(fn).read())
12
12
    modules = set()
13
13
    depgraph = t['depgraph']
14
 
    for mod, deps in depgraph.items():
 
14
    for mod, deps in list(depgraph.items()):
15
15
        if mod != '__main__':
16
16
            modules.add(mod)
17
 
        modules.update(deps.keys())
 
17
        modules.update(list(deps.keys()))
18
18
    return depgraph, modules
19
19
 
20
20
def main():
21
21
    mods = get_listed(sys.argv[1])
22
22
    depgraph, deps = get_dependencies(sys.argv[2])
23
 
    print("Listed modules:", sorted(mods))
 
23
    print(("Listed modules:", sorted(mods)))
24
24
    print("")
25
 
    print("Dependent modules:", sorted(deps))
 
25
    print(("Dependent modules:", sorted(deps)))
26
26
    print("")
27
27
 
28
28
    missing = deps.difference(mods)
31
31
        print(missing)
32
32
    for m in missing:
33
33
        users = []
34
 
        for caller, callees in depgraph.items():
 
34
        for caller, callees in list(depgraph.items()):
35
35
            if m in callees:
36
36
                users.append(caller)
37
 
        print(m, "used in: ", users)
 
37
        print((m, "used in: ", users))
38
38
    sys.exit(len(missing))
39
39
 
40
40
main()