def update_dependee_references(self): dependee_targets = self.dependency_graph()[ # TODO: The **{} seems unnecessary. Target(name=self._from_address.target_name, address=self._from_address, build_graph=self.context.build_graph, **{})] logging.disable(logging.WARNING) buildozer_binary = BuildozerBinary.scoped_instance(self) for concrete_target in dependee_targets: for formats in [{ 'from': self._from_address.spec, 'to': self._to_address.spec }, { 'from': ':{}'.format(self._from_address.target_name), 'to': ':{}'.format(self._to_address.target_name) }]: buildozer_binary.execute('replace dependencies {} {}'.format( formats['from'], formats['to']), spec=concrete_target.address.spec, context=self.context) logging.disable(logging.NOTSET)
def update_dependee_references(self): dependee_targets = self.dependency_graph()[ # TODO: The **{} seems unnecessary. Target(name=self._from_address.target_name, address=self._from_address, build_graph=self.context.build_graph, **{}) ] logging.disable(logging.WARNING) buildozer_binary = BuildozerBinary.scoped_instance(self) for concrete_target in dependee_targets: for formats in [ { 'from': self._from_address.spec, 'to': self._to_address.spec }, { 'from': ':{}'.format(self._from_address.target_name), 'to': ':{}'.format( self._to_address.target_name) } ]: buildozer_binary.execute( 'replace dependencies {} {}'.format(formats['from'], formats['to']), spec=concrete_target.address.spec, context=self.context ) logging.disable(logging.NOTSET)
def update_original_build_name(self): BuildozerBinary.scoped_instance(self).execute( 'set name {}'.format(self._to_address.target_name), spec=self._from_address.spec, context=self.context)
def _execute_buildozer_script(self, command): binary = BuildozerBinary.scoped_instance(self) for root in self.context.target_roots: binary.execute(command, root.address.spec, context=self.context)