* 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):
|
def __init__(self, out = sys.stdout):
|
||||||
self.out = out
|
self.out = out
|
||||||
def __ror__(self,input):
|
def __ror__(self,input):
|
||||||
for l in input:
|
for line in input:
|
||||||
print >> self.out, l
|
print >> self.out, line
|
||||||
|
|
||||||
printlines = printto(sys.stdout)
|
printlines = printto(sys.stdout)
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ from pisi.ui import ui
|
|||||||
|
|
||||||
def commandsString():
|
def commandsString():
|
||||||
s = ''
|
s = ''
|
||||||
l = commands.keys()
|
list = commands.keys()
|
||||||
l.sort()
|
list.sort()
|
||||||
for x in l:
|
for x in list:
|
||||||
s += x + '\n'
|
s += x + '\n'
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -35,11 +35,11 @@ class digraph(object):
|
|||||||
|
|
||||||
def edges(self):
|
def edges(self):
|
||||||
"return a list of edge descriptors"
|
"return a list of edge descriptors"
|
||||||
l = []
|
list = []
|
||||||
for u in self.__v:
|
for u in self.__v:
|
||||||
for v in self.__u:
|
for v in self.__u:
|
||||||
l.append( (u,v) )
|
list.append( (u,v) )
|
||||||
return l
|
return list
|
||||||
|
|
||||||
def from_list(self, el):
|
def from_list(self, el):
|
||||||
"convert a list of edges (u,v) to graph"
|
"convert a list of edges (u,v) to graph"
|
||||||
@@ -125,10 +125,10 @@ class digraph(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def topological_sort(self):
|
def topological_sort(self):
|
||||||
l = []
|
list = []
|
||||||
self.dfs(lambda u: l.append(u))
|
self.dfs(lambda u: list.append(u))
|
||||||
l.reverse()
|
list.reverse()
|
||||||
return l
|
return list
|
||||||
|
|
||||||
def write_graphviz(self, f):
|
def write_graphviz(self, f):
|
||||||
f.write('digraph G {\n')
|
f.write('digraph G {\n')
|
||||||
|
|||||||
+6
-6
@@ -65,17 +65,17 @@ class InstallDB:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def list_installed(self):
|
def list_installed(self):
|
||||||
l = []
|
list = []
|
||||||
for (pkg, (status,version,release)) in self.d.iteritems():
|
for (pkg, (status,version,release)) in self.d.iteritems():
|
||||||
if status=='i':
|
if status=='i':
|
||||||
l.append(pkg)
|
list.append(pkg)
|
||||||
return l
|
return list
|
||||||
|
|
||||||
def list_pending(self):
|
def list_pending(self):
|
||||||
l = []
|
list = []
|
||||||
for (pkg, x) in self.dp.iteritems():
|
for (pkg, x) in self.dp.iteritems():
|
||||||
l.append(pkg)
|
list.append(pkg)
|
||||||
return l
|
return list
|
||||||
|
|
||||||
def get_version(self, pkg):
|
def get_version(self, pkg):
|
||||||
pkg = str(pkg)
|
pkg = str(pkg)
|
||||||
|
|||||||
+3
-3
@@ -71,10 +71,10 @@ class PackageDB(object):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
def list_packages(self):
|
def list_packages(self):
|
||||||
l = []
|
list = []
|
||||||
for (pkg, x) in self.d.iteritems():
|
for (pkg, x) in self.d.iteritems():
|
||||||
l.append(pkg)
|
list.append(pkg)
|
||||||
return l
|
return list
|
||||||
|
|
||||||
def add_package(self, package_info):
|
def add_package(self, package_info):
|
||||||
name = str(package_info.name)
|
name = str(package_info.name)
|
||||||
|
|||||||
+4
-4
@@ -215,8 +215,8 @@ class SourceInfo:
|
|||||||
xml.addTextNodeUnder(node, "Homepage", self.homepage)
|
xml.addTextNodeUnder(node, "Homepage", self.homepage)
|
||||||
node.appendChild(self.packager.elt(xml))
|
node.appendChild(self.packager.elt(xml))
|
||||||
xml.addTextNodeUnder(node, "Description", self.description)
|
xml.addTextNodeUnder(node, "Description", self.description)
|
||||||
for l in self.license:
|
for lic in self.license:
|
||||||
xml.addTextNodeUnder(node, "License", l)
|
xml.addTextNodeUnder(node, "License", lic)
|
||||||
for isa in self.isa:
|
for isa in self.isa:
|
||||||
xml.addTextNodeUnder(node, "IsA", isa)
|
xml.addTextNodeUnder(node, "IsA", isa)
|
||||||
xml.addTextNodeUnder(node, "PartOf", self.partof)
|
xml.addTextNodeUnder(node, "PartOf", self.partof)
|
||||||
@@ -282,8 +282,8 @@ class PackageInfo(object):
|
|||||||
xml.addTextNodeUnder(node, "Name", self.name)
|
xml.addTextNodeUnder(node, "Name", self.name)
|
||||||
xml.addTextNodeUnder(node, "Summary", self.summary)
|
xml.addTextNodeUnder(node, "Summary", self.summary)
|
||||||
xml.addTextNodeUnder(node, "Description", self.description)
|
xml.addTextNodeUnder(node, "Description", self.description)
|
||||||
for l in self.license:
|
for lic in self.license:
|
||||||
xml.addTextNodeUnder(node, "License", l)
|
xml.addTextNodeUnder(node, "License", lic)
|
||||||
for isa in self.isa:
|
for isa in self.isa:
|
||||||
xml.addTextNodeUnder(node, "IsA", isa)
|
xml.addTextNodeUnder(node, "IsA", isa)
|
||||||
if self.partof:
|
if self.partof:
|
||||||
|
|||||||
+11
-11
@@ -124,10 +124,10 @@ def install_pkg_names(A):
|
|||||||
G_f.add_dep(x, dep)
|
G_f.add_dep(x, dep)
|
||||||
B = Bp
|
B = Bp
|
||||||
G_f.write_graphviz(sys.stdout)
|
G_f.write_graphviz(sys.stdout)
|
||||||
l = G_f.topological_sort()
|
order = G_f.topological_sort()
|
||||||
l.reverse()
|
order.reverse()
|
||||||
print l
|
print order
|
||||||
for x in l:
|
for x in order:
|
||||||
operations.install_single_name(x)
|
operations.install_single_name(x)
|
||||||
|
|
||||||
return True # everything went OK :)
|
return True # everything went OK :)
|
||||||
@@ -190,10 +190,10 @@ def upgrade_pkg_names(A):
|
|||||||
G_f.add_dep(x, dep)
|
G_f.add_dep(x, dep)
|
||||||
B = Bp
|
B = Bp
|
||||||
G_f.write_graphviz(sys.stdout)
|
G_f.write_graphviz(sys.stdout)
|
||||||
l = G_f.topological_sort()
|
order = G_f.topological_sort()
|
||||||
l.reverse()
|
order.reverse()
|
||||||
print l
|
print order
|
||||||
for x in l:
|
for x in order:
|
||||||
operations.install_single_name(x, True)
|
operations.install_single_name(x, True)
|
||||||
|
|
||||||
return True # everything went OK :)
|
return True # everything went OK :)
|
||||||
@@ -241,9 +241,9 @@ def remove(A):
|
|||||||
G_f.add_plain_dep(rev_dep, x)
|
G_f.add_plain_dep(rev_dep, x)
|
||||||
B = Bp
|
B = Bp
|
||||||
G_f.write_graphviz(sys.stdout)
|
G_f.write_graphviz(sys.stdout)
|
||||||
l = G_f.topological_sort()
|
order = G_f.topological_sort()
|
||||||
print l
|
print order
|
||||||
for x in l:
|
for x in order:
|
||||||
if installdb.is_installed(x):
|
if installdb.is_installed(x):
|
||||||
operations.remove_single(x)
|
operations.remove_single(x)
|
||||||
else:
|
else:
|
||||||
|
|||||||
+6
-6
@@ -108,10 +108,10 @@ def run_batch(cmd):
|
|||||||
def splitpath(a):
|
def splitpath(a):
|
||||||
"""split path into components and return as a list
|
"""split path into components and return as a list
|
||||||
os.path.split doesn't do what I want"""
|
os.path.split doesn't do what I want"""
|
||||||
l = a.split(os.path.sep)
|
comps = a.split(os.path.sep)
|
||||||
if l[len(l)-1]=='':
|
if comps[len(comps)-1]=='':
|
||||||
l.pop()
|
comps.pop()
|
||||||
return l
|
return comps
|
||||||
|
|
||||||
# I'm not sure how necessary this is. Ahem.
|
# I'm not sure how necessary this is. Ahem.
|
||||||
def commonprefix(l):
|
def commonprefix(l):
|
||||||
@@ -238,8 +238,8 @@ def sha1_file(filename):
|
|||||||
try:
|
try:
|
||||||
m = sha.new()
|
m = sha.new()
|
||||||
f = file(filename, 'rb')
|
f = file(filename, 'rb')
|
||||||
for l in f:
|
for line in f:
|
||||||
m.update(l)
|
m.update(line)
|
||||||
return m.hexdigest()
|
return m.hexdigest()
|
||||||
except IOError:
|
except IOError:
|
||||||
return "0"
|
return "0"
|
||||||
|
|||||||
Reference in New Issue
Block a user