示例#1
0
 def ifwname(self):
     p_name = ft.ifw_name(self.project)
     c_name = ft.ifw_name(self.name)
     res = {
         'run': "brainvisa.app.%s.run.%s" % (p_name, c_name),
         'usrdoc': "brainvisa.app.%s.usrdoc.%s" % (p_name, c_name),
         'dev': "brainvisa.dev.%s.dev.%s" % (p_name, c_name),
         'devdoc': "brainvisa.dev.%s.devdoc.%s" % (p_name, c_name),
         'test': "brainvisa.test.%s.test.%s" % (p_name, c_name),
         'thirdparty': "brainvisa.app.thirdparty.%s" % (c_name)
     }
     return res[self.type]
示例#2
0
    def ifwpackage(self):
        tag_deps = list()
        if self.dependencies:
            for dep_pack in self.dependencies:
                tag_dep = TagDependency(
                    name=dep_pack.ifwname,
                    version=self.make_valid_version(dep_pack.version))
                tag_deps.append(tag_dep)
        if self.type == 'run':
            tag_deps.append(TagDependency(
                name="brainvisa.app.thirdparty.bv_env"))
        if self.licenses:
            for lic in self.licenses:
                valid_name = ft.ifw_name(lic)
                license_component = "brainvisa.app.licenses.%s" % valid_name
                tag_dep = TagDependency(name=license_component)
                tag_deps.append(tag_dep)

        package = IFWPackage(
            DisplayName=self.displayname,
            Description=self.description,
            Version=self.make_valid_version(self.version),
            ReleaseDate=self.date,
            Name=self.ifwname,
            TagDependencies=tag_deps,
            Virtual=self.virtual,
            Script=self.script,
            TagLicenses=None,
            Default=self.default)
        return package
示例#3
0
 def ifwname(self):
     p_name = ft.ifw_name(self.name)
     res = {
         'run': "brainvisa.app.%s" % (p_name),
         'usrdoc': "brainvisa.app.%s" % (p_name),
         'dev': "brainvisa.dev.%s" % (p_name),
         'devdoc': "brainvisa.dev.%s" % (p_name),
         'test': "brainvisa.test.%s" % (p_name)
     }
     return res[self.type]
示例#4
0
def test_ifw_name():
    assert format.ifw_name('library_23930') == 'library_23930'
    assert format.ifw_name('library-323.234') == 'library_323_234'
    assert format.ifw_name('My Library 30283') == 'my_library_30283'
    assert format.ifw_name('lib.lib') == 'lib_lib'
    assert format.ifw_name('LibRary_23930') == 'library_23930'
示例#5
0
 def ifwname(self):
     p_name = ft.ifw_name(self.name)
     return "brainvisa.app.licenses.%s" % p_name