mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
projects.py: Remove reference to deprecated sets module
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e0adaa815d
commit
6c0c3af50f
1 changed files with 7 additions and 8 deletions
|
|
@ -5,7 +5,6 @@ import os
|
|||
import sys
|
||||
import argparse
|
||||
import pwd
|
||||
from sets import Set
|
||||
from os.path import isfile
|
||||
from os.path import isdir
|
||||
from os.path import expanduser
|
||||
|
|
@ -90,7 +89,7 @@ class Build(object):
|
|||
p.wait()
|
||||
if p.returncode:
|
||||
raise Exception("failed to get " + prereq_type + " prerequisites for " + cur + ": " + cmd)
|
||||
r = Set()
|
||||
r = set()
|
||||
pattern = re.compile(r'.*') # might be useful at a later point, currently pointless
|
||||
for line in iter(p.stdout.readline,''):
|
||||
debug(cmd + ' returned: ', line)
|
||||
|
|
@ -113,7 +112,7 @@ class Build(object):
|
|||
debug('already handled module ' + cur)
|
||||
return 0
|
||||
|
||||
deps = Set()
|
||||
deps = set()
|
||||
all_deps.add(cur)
|
||||
for t in prereq_types:
|
||||
debug("checking prereqisites of type " + t)
|
||||
|
|
@ -124,7 +123,7 @@ class Build(object):
|
|||
return len(deps)
|
||||
|
||||
def calculate_order(self, order, modules, prereq_types):
|
||||
all_deps = Set()
|
||||
all_deps = set()
|
||||
dep_tree = {}
|
||||
for m in modules:
|
||||
debug("--- adding dependency tree of module " + m)
|
||||
|
|
@ -462,10 +461,10 @@ def get_modules_from_project_txt(names, section, keys, add_self, scope,
|
|||
names_only = True):
|
||||
if isinstance(keys, basestring):
|
||||
keys = [ keys ]
|
||||
#r = Set()
|
||||
#r = set()
|
||||
r = []
|
||||
for key in keys:
|
||||
visited = Set()
|
||||
visited = set()
|
||||
for name in names:
|
||||
rr = []
|
||||
add_modules_from_project_txt_cached(rr, visited, name, section, key, add_self, scope,
|
||||
|
|
@ -801,7 +800,7 @@ def flip_graph(graph):
|
|||
for m, deps in graph.iteritems():
|
||||
for d in deps:
|
||||
if not d in r:
|
||||
r[d] = Set()
|
||||
r[d] = set()
|
||||
r[d].add(m)
|
||||
return r
|
||||
|
||||
|
|
@ -831,7 +830,7 @@ def cmd_check(args_):
|
|||
path = []
|
||||
read_dep_graph(args.module, args.flavour, graph)
|
||||
unvisited = graph.keys()
|
||||
temp = Set()
|
||||
temp = set()
|
||||
while len(unvisited) is not 0:
|
||||
m = unvisited[0]
|
||||
debug('checking circular dependency of', m)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue