Esempio n. 1
0
    def set_package(self, dependencies, conflicts):
        self.package.name = self.name
        self.package.conflicts = conflicts

        if dependencies:
            for depname in dependencies:
                dep = Dependency()
                dep.package = depname
                self.package.packageDependencies.append(dep)

        self.pspec.packages.append(self.package)
Esempio n. 2
0
    def add_dependencies(self, dependencies):
        # special case of given one dependency package
        # with depedency versioning info [**kw, name]
        # [{"versionFrom":"0.4.2"}, "udev"]
        if type(dependencies[0]) == dict:
            dep = Dependency()
            (kw, dep.package) = dependencies
            dep.__dict__[kw.keys()[0]] = kw.values()[0]
            self.package.packageDependencies.append(dep)
            return

        for depname in dependencies:
            dep = Dependency()
            dep.package = depname
            self.package.packageDependencies.append(dep)
Esempio n. 3
0
    def add_dependencies(self, dependencies):
        # special case of given one dependency package
        # with depedency versioning info [**kw, name]
        # [{"versionFrom":"0.4.2"}, "udev"]
        if type(dependencies[0]) == dict:
            dep = Dependency()
            (kw, dep.package) = dependencies
            dep.__dict__[list(kw.keys())[0]] = list(kw.values())[0]
            self.package.packageDependencies.append(dep)
            return

        for depname in dependencies:
            dep = Dependency()
            dep.package = depname
            self.package.packageDependencies.append(dep)
Esempio n. 4
0
    def set_package(self, dependencies, conflicts):
        self.package.name = self.name

        if dependencies:
            for depname in dependencies:
                dep = Dependency()
                dep.package = depname
                self.package.packageDependencies.append(dep)

        if conflicts:
            for package in conflicts:
                conflict = Conflict()
                conflict.package = package
                self.package.conflicts.append(conflict)

        self.pspec.packages.append(self.package)
Esempio n. 5
0
    def set_package(self, dependencies, conflicts):
        self.package.name = self.name

        if dependencies:
            for depname in dependencies:
                dep = Dependency()
                dep.package = depname
                self.package.packageDependencies.append(dep)

        if conflicts:
            for package in conflicts:
                conflict = Conflict()
                conflict.package = package
                self.package.conflicts.append(conflict)

        self.pspec.packages.append(self.package)