* add eric3 project file
* use something else than the name "l" where it would be descriptive following ptyhon stdlib naming conventions
This commit is contained in:
@@ -0,0 +1,335 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-3.7.dtd">
|
||||
<!-- Project file for project pisi -->
|
||||
<!-- Saved: 2005-08-10, 19:32:09 -->
|
||||
<!-- Copyright (C) 2005 PiSi Development Team, pisi@uludag.org.tr -->
|
||||
<Project version="3.7">
|
||||
<ProgLanguage mixed="0">Python</ProgLanguage>
|
||||
<UIType>Kde</UIType>
|
||||
<Description>The package management software of Pardus distribution.
|
||||
</Description>
|
||||
<Version>0.2</Version>
|
||||
<Author>PiSi Development Team</Author>
|
||||
<Email>pisi@uludag.org.tr</Email>
|
||||
<Sources>
|
||||
<Source>
|
||||
<Dir>tools</Dir>
|
||||
<Name>ebuild2pisi.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tools</Dir>
|
||||
<Name>cat-db.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tools</Dir>
|
||||
<Name>list-portage-base.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Dir>popt</Dir>
|
||||
<Name>actions.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Dir>zip</Dir>
|
||||
<Name>actions.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Dir>unzip</Dir>
|
||||
<Name>actions.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>configfiletests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>sourcedbtests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>utiltests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>installdbtests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>run.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>metadatatests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>constantstests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>fetchertests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>archivetests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>versiontests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>actionsapitests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>specfiletests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>packagetests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>packagedbtests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>tests</Dir>
|
||||
<Name>graphtests.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>get.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>shelltools.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>variables.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>autotools.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>pisitools.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>kde.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>pisitools_functions.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>__init__.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>libtools.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>actionsapi</Dir>
|
||||
<Name>coreutils.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>cli</Dir>
|
||||
<Name>common.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>cli</Dir>
|
||||
<Name>pisicli.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>cli</Dir>
|
||||
<Name>__init__.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Dir>cli</Dir>
|
||||
<Name>commands.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>lockeddbshelve.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>comariface.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>specfile.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>package.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>__init__.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>build.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>xmlfile.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>packagedb.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>colors.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>files.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>config.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>index.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>repodb.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>ui.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>util.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>dependency.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>metadata.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>pgraph.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>operations.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>context.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>toplevel.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>sourcefetcher.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>graph.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>sourcearchive.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>configfile.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>sourcedb.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>install.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>installdb.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>constants.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>fetcher.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>archive.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>xmlext.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>purl.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>version.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Dir>pisi</Dir>
|
||||
<Name>exception.py</Name>
|
||||
</Source>
|
||||
<Source>
|
||||
<Name>setup.py</Name>
|
||||
</Source>
|
||||
</Sources>
|
||||
<Forms>
|
||||
</Forms>
|
||||
<Translations>
|
||||
</Translations>
|
||||
<Interfaces>
|
||||
</Interfaces>
|
||||
<Others>
|
||||
<Other>
|
||||
<Name>pisi-cli</Name>
|
||||
</Other>
|
||||
</Others>
|
||||
<MainScript>
|
||||
<Name>pisi-cli</Name>
|
||||
</MainScript>
|
||||
<Vcs>
|
||||
<VcsType>Subversion</VcsType>
|
||||
<VcsOptions>{'status': [], 'log': [], 'global': [], 'update': [], 'remove': [], 'add': [], 'tag': [], 'export': [], 'diff': [], 'commit': [], 'checkout': [], 'history': []}</VcsOptions>
|
||||
<VcsOtherData>{'standardLayout': 1}</VcsOtherData>
|
||||
</Vcs>
|
||||
</Project>
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+7
-7
@@ -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')
|
||||
|
||||
+6
-6
@@ -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)
|
||||
|
||||
+3
-3
@@ -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)
|
||||
|
||||
+4
-4
@@ -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:
|
||||
|
||||
+11
-11
@@ -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:
|
||||
|
||||
+6
-6
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user