[MERGE] From-Import-Removal in specfile.py

This commit is contained in:
Faik Uygur
2007-04-26 07:24:45 +00:00
parent 9e2cb30b50
commit 1c2e697b54
+8 -9
View File
@@ -21,15 +21,14 @@ __trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
# standard python modules
from os.path import basename
import os.path
# pisi modules
from pisi.pxml.xmlfile import XmlFile
import pisi.pxml.xmlfile as xmlfile
import pisi.pxml.autoxml as autoxml
import pisi.context as ctx
from pisi.dependency import Dependency
from pisi.conflict import Conflict
import pisi.dependency
import pisi.conflict
import pisi.component as component
import pisi.util as util
@@ -135,7 +134,7 @@ class Archive:
a_sha1sum =[ autoxml.String, autoxml.mandatory ]
def decode_hook(self, node, errs, where):
self.name = basename(self.uri)
self.name = os.path.basename(self.uri)
def __str__(self):
s = _('URI: %s, type: %s, sha1sum: %s') % (self.uri, self.type, self.sha1sum)
@@ -154,7 +153,7 @@ class Source:
t_Description = [autoxml.LocalText, autoxml.optional]
t_Icon = [ autoxml.String, autoxml.optional]
t_Archive = [Archive, autoxml.mandatory ]
t_BuildDependencies = [ [Dependency], autoxml.optional]
t_BuildDependencies = [ [pisi.dependency.Dependency], autoxml.optional]
t_Patches = [ [Patch], autoxml.optional]
t_Version = [ autoxml.String, autoxml.optional]
t_Release = [ autoxml.String, autoxml.optional]
@@ -170,10 +169,10 @@ class Package:
t_PartOf = [autoxml.String, autoxml.optional]
t_License = [ [autoxml.String], autoxml.optional]
t_Icon = [ autoxml.String, autoxml.optional]
t_PackageDependencies = [ [Dependency], autoxml.optional, "RuntimeDependencies/Dependency"]
t_PackageDependencies = [ [pisi.dependency.Dependency], autoxml.optional, "RuntimeDependencies/Dependency"]
t_ComponentDependencies = [ [autoxml.String], autoxml.optional, "RuntimeDependencies/Component"]
t_Files = [ [Path], autoxml.optional]
t_Conflicts = [ [Conflict], autoxml.optional, "Conflicts/Package"]
t_Conflicts = [ [pisi.conflict.Conflict], autoxml.optional, "Conflicts/Package"]
t_ProvidesComar = [ [ComarProvide], autoxml.optional, "Provides/COMAR"]
#t_RequiresComar = [ [autoxml.String], autoxml.mandatory, "Requires/COMAR"]
t_AdditionalFiles = [ [AdditionalFile], autoxml.optional]
@@ -222,7 +221,7 @@ class Package:
return s + '\n'
class SpecFile(XmlFile):
class SpecFile(xmlfile.XmlFile):
__metaclass__ = autoxml.autoxml #needed when we specify a superclass
tag = "PISI"