def dependency_info(self): ret = DependencyInformation() ret.add(super(IDLBuilder, self).dependency_info()) external_name = '/'.join(self.__install_path + [self.file().name()]) internal_name = self.file().name() ret.add_provide(Provide_IDL(external_name)) if external_name != internal_name: ret.add_internal_provide(Provide_IDL(internal_name)) pass for inc in self.__includes: ret.add_require(Require_IDL(filename=inc, found_in='/'.join(self.file().relpath(self.package().rootdirectory())), urgency=Require.URGENCY_WARN)) pass return ret
def dependency_info(self): """ Get the dependency information of self, but only if disable_dependency_info() has not been called. """ # note that we have to pass the request on to the base, since # somebody checks that the base was reached. a good idea # otherwise, but here we have to throw the information away # and return nothing in case we were instructed to do so. ret = self.do_really_get_dependency_info() if self.__dependency_info_disabled: return DependencyInformation() return ret
def dependency_info(self): ret = DependencyInformation() ret.add(super(Slave, self).dependency_info()) # we require the original header for obvious reasons. ret.add_require( RequireRelocatedHeader( filename=self.__header_builder.file().name(), source_directory=self.__header_builder.parentbuilder(). directory().relpath(self.package().rootbuilder().directory()))) # we steal the dependency info from the original header. FIXME # (possibly): what about the "internal provide" stuff? ret.add(self.__header_builder.do_really_get_dependency_info()) return ret
def dependency_info(self): ret = DependencyInformation() ret.add(super(Master, self).dependency_info()) ret.add_provide( ProvideRelocatedHeader( filename=self.__header_builder.file().name(), source_directory=self.parentbuilder().directory().relpath( self.package().rootbuilder().directory()))) return ret
def dependency_info(self): ret = DependencyInformation() ret.add(super(CBaseBuilder, self).dependency_info()) for h_file in helper.iter_includes(self.file().lines()): ret.add_require( Require_CInclude(filename=h_file, found_in='/'.join(self.file().relpath( self.package().rootdirectory())))) pass return ret
def do_really_get_dependency_info(self): """ Get the dependency information, regardles if disable_dependency_info() has been called. """ ret = DependencyInformation() ret.add(super(HeaderBuilder, self).dependency_info()) outer_name = '/'.join(self.visibility() + [self.file().name()]) # provide ourself to the wide public. ret.add_provide(Provide_CInclude(filename=outer_name)) # regardless if we will provide ourselves to the outer world, # and regardless of how we will be doing that, we will likely # be included/required by files in the same directory. to # neutralize their require objects (a node eliminates require # objects the are resolved internally), provide ourselves. if outer_name is None or self.file().name() != outer_name: ret.add_internal_provide( Provide_CInclude(filename=self.file().name())) pass return ret
def test(self): d1 = DependencyInformation() d2 = DependencyInformation() self.failUnless(d1.is_equal(d2)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d1.add_provide(Provide('b')) d2 = DependencyInformation() d2.add_provide(Provide('a')) d2.add_provide(Provide('b')) self.failUnless(d1.is_equal(d2)) self.failUnless(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d2 = DependencyInformation() self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d2 = DependencyInformation() d2.add_provide(Provide('b')) self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d2 = DependencyInformation() d2.add_provide(Provide('a', Provide.GLOB_MATCH)) self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a', Provide.GLOB_MATCH)) d2 = DependencyInformation() d2.add_provide(Provide('a', Provide.GLOB_MATCH)) self.failUnless(d1.is_equal(d2)) self.failUnless(d2.is_equal(d1)) d1 = DependencyInformation() d1.add_provide(Provide('a')) d1.add_require(Require(string='a', found_in=[])) d2 = DependencyInformation() d2.add_provide(Provide('a')) self.failIf(d1.is_equal(d2)) self.failIf(d2.is_equal(d1)) pass