From a58fd154e688473d091fcf847cfd6177ee40a6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Wed, 10 Aug 2005 16:44:53 +0000 Subject: [PATCH] * add eric3 project file * use something else than the name "l" where it would be descriptive following ptyhon stdlib naming conventions --- pisi.e3p | 335 +++++++++++++++++++++++++++++++++++ pisi/actionsapi/coreutils.py | 4 +- pisi/cli/commands.py | 6 +- pisi/graph.py | 14 +- pisi/installdb.py | 12 +- pisi/packagedb.py | 6 +- pisi/specfile.py | 8 +- pisi/toplevel.py | 22 +-- pisi/util.py | 12 +- 9 files changed, 377 insertions(+), 42 deletions(-) create mode 100644 pisi.e3p diff --git a/pisi.e3p b/pisi.e3p new file mode 100644 index 00000000..a0f7506c --- /dev/null +++ b/pisi.e3p @@ -0,0 +1,335 @@ + + + + + + + Python + Kde + The package management software of Pardus distribution. + + 0.2 + PiSi Development Team + pisi@uludag.org.tr + + + tools + ebuild2pisi.py + + + tools + cat-db.py + + + tools + list-portage-base.py + + + tests + popt + actions.py + + + tests + zip + actions.py + + + tests + unzip + actions.py + + + tests + configfiletests.py + + + tests + sourcedbtests.py + + + tests + utiltests.py + + + tests + installdbtests.py + + + tests + run.py + + + tests + metadatatests.py + + + tests + constantstests.py + + + tests + fetchertests.py + + + tests + archivetests.py + + + tests + versiontests.py + + + tests + actionsapitests.py + + + tests + specfiletests.py + + + tests + packagetests.py + + + tests + packagedbtests.py + + + tests + graphtests.py + + + pisi + actionsapi + get.py + + + pisi + actionsapi + shelltools.py + + + pisi + actionsapi + variables.py + + + pisi + actionsapi + autotools.py + + + pisi + actionsapi + pisitools.py + + + pisi + actionsapi + kde.py + + + pisi + actionsapi + pisitools_functions.py + + + pisi + actionsapi + __init__.py + + + pisi + actionsapi + libtools.py + + + pisi + actionsapi + coreutils.py + + + pisi + cli + common.py + + + pisi + cli + pisicli.py + + + pisi + cli + __init__.py + + + pisi + cli + commands.py + + + pisi + lockeddbshelve.py + + + pisi + comariface.py + + + pisi + specfile.py + + + pisi + package.py + + + pisi + __init__.py + + + pisi + build.py + + + pisi + xmlfile.py + + + pisi + packagedb.py + + + pisi + colors.py + + + pisi + files.py + + + pisi + config.py + + + pisi + index.py + + + pisi + repodb.py + + + pisi + ui.py + + + pisi + util.py + + + pisi + dependency.py + + + pisi + metadata.py + + + pisi + pgraph.py + + + pisi + operations.py + + + pisi + context.py + + + pisi + toplevel.py + + + pisi + sourcefetcher.py + + + pisi + graph.py + + + pisi + sourcearchive.py + + + pisi + configfile.py + + + pisi + sourcedb.py + + + pisi + install.py + + + pisi + installdb.py + + + pisi + constants.py + + + pisi + fetcher.py + + + pisi + archive.py + + + pisi + xmlext.py + + + pisi + purl.py + + + pisi + version.py + + + pisi + exception.py + + + setup.py + + + + + + + + + + + pisi-cli + + + + pisi-cli + + + Subversion + {'status': [], 'log': [], 'global': [], 'update': [], 'remove': [], 'add': [], 'tag': [], 'export': [], 'diff': [], 'commit': [], 'checkout': [], 'history': []} + {'standardLayout': 1} + + diff --git a/pisi/actionsapi/coreutils.py b/pisi/actionsapi/coreutils.py index c8f5c8b4..4335589f 100644 --- a/pisi/actionsapi/coreutils.py +++ b/pisi/actionsapi/coreutils.py @@ -40,8 +40,8 @@ class printto: def __init__(self, out = sys.stdout): self.out = out def __ror__(self,input): - for l in input: - print >> self.out, l + for line in input: + print >> self.out, line printlines = printto(sys.stdout) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 3a4fccfe..aa55dd35 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -22,9 +22,9 @@ from pisi.ui import ui def commandsString(): s = '' - l = commands.keys() - l.sort() - for x in l: + list = commands.keys() + list.sort() + for x in list: s += x + '\n' return s diff --git a/pisi/graph.py b/pisi/graph.py index 7217596a..0c4a8f97 100644 --- a/pisi/graph.py +++ b/pisi/graph.py @@ -35,11 +35,11 @@ class digraph(object): def edges(self): "return a list of edge descriptors" - l = [] + list = [] for u in self.__v: for v in self.__u: - l.append( (u,v) ) - return l + list.append( (u,v) ) + return list def from_list(self, el): "convert a list of edges (u,v) to graph" @@ -125,10 +125,10 @@ class digraph(object): return False def topological_sort(self): - l = [] - self.dfs(lambda u: l.append(u)) - l.reverse() - return l + list = [] + self.dfs(lambda u: list.append(u)) + list.reverse() + return list def write_graphviz(self, f): f.write('digraph G {\n') diff --git a/pisi/installdb.py b/pisi/installdb.py index 6bb25e66..259ea05d 100644 --- a/pisi/installdb.py +++ b/pisi/installdb.py @@ -65,17 +65,17 @@ class InstallDB: return False def list_installed(self): - l = [] + list = [] for (pkg, (status,version,release)) in self.d.iteritems(): if status=='i': - l.append(pkg) - return l + list.append(pkg) + return list def list_pending(self): - l = [] + list = [] for (pkg, x) in self.dp.iteritems(): - l.append(pkg) - return l + list.append(pkg) + return list def get_version(self, pkg): pkg = str(pkg) diff --git a/pisi/packagedb.py b/pisi/packagedb.py index 5dedb105..9089d66b 100644 --- a/pisi/packagedb.py +++ b/pisi/packagedb.py @@ -71,10 +71,10 @@ class PackageDB(object): return [] def list_packages(self): - l = [] + list = [] for (pkg, x) in self.d.iteritems(): - l.append(pkg) - return l + list.append(pkg) + return list def add_package(self, package_info): name = str(package_info.name) diff --git a/pisi/specfile.py b/pisi/specfile.py index 4984aa5b..ef150d0a 100644 --- a/pisi/specfile.py +++ b/pisi/specfile.py @@ -215,8 +215,8 @@ class SourceInfo: xml.addTextNodeUnder(node, "Homepage", self.homepage) node.appendChild(self.packager.elt(xml)) xml.addTextNodeUnder(node, "Description", self.description) - for l in self.license: - xml.addTextNodeUnder(node, "License", l) + for lic in self.license: + xml.addTextNodeUnder(node, "License", lic) for isa in self.isa: xml.addTextNodeUnder(node, "IsA", isa) xml.addTextNodeUnder(node, "PartOf", self.partof) @@ -282,8 +282,8 @@ class PackageInfo(object): xml.addTextNodeUnder(node, "Name", self.name) xml.addTextNodeUnder(node, "Summary", self.summary) xml.addTextNodeUnder(node, "Description", self.description) - for l in self.license: - xml.addTextNodeUnder(node, "License", l) + for lic in self.license: + xml.addTextNodeUnder(node, "License", lic) for isa in self.isa: xml.addTextNodeUnder(node, "IsA", isa) if self.partof: diff --git a/pisi/toplevel.py b/pisi/toplevel.py index ddd4cc84..5f89a413 100644 --- a/pisi/toplevel.py +++ b/pisi/toplevel.py @@ -124,10 +124,10 @@ def install_pkg_names(A): G_f.add_dep(x, dep) B = Bp G_f.write_graphviz(sys.stdout) - l = G_f.topological_sort() - l.reverse() - print l - for x in l: + order = G_f.topological_sort() + order.reverse() + print order + for x in order: operations.install_single_name(x) return True # everything went OK :) @@ -190,10 +190,10 @@ def upgrade_pkg_names(A): G_f.add_dep(x, dep) B = Bp G_f.write_graphviz(sys.stdout) - l = G_f.topological_sort() - l.reverse() - print l - for x in l: + order = G_f.topological_sort() + order.reverse() + print order + for x in order: operations.install_single_name(x, True) return True # everything went OK :) @@ -241,9 +241,9 @@ def remove(A): G_f.add_plain_dep(rev_dep, x) B = Bp G_f.write_graphviz(sys.stdout) - l = G_f.topological_sort() - print l - for x in l: + order = G_f.topological_sort() + print order + for x in order: if installdb.is_installed(x): operations.remove_single(x) else: diff --git a/pisi/util.py b/pisi/util.py index 58f7943d..e16a7d55 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -108,10 +108,10 @@ def run_batch(cmd): def splitpath(a): """split path into components and return as a list os.path.split doesn't do what I want""" - l = a.split(os.path.sep) - if l[len(l)-1]=='': - l.pop() - return l + comps = a.split(os.path.sep) + if comps[len(comps)-1]=='': + comps.pop() + return comps # I'm not sure how necessary this is. Ahem. def commonprefix(l): @@ -238,8 +238,8 @@ def sha1_file(filename): try: m = sha.new() f = file(filename, 'rb') - for l in f: - m.update(l) + for line in f: + m.update(line) return m.hexdigest() except IOError: return "0"