def __str__(self):
        """String representation of the building block"""

        scif_recipe = self.__scif_recipe()

        if (self.__native and
            hpccm.config.g_ctype == container_type.SINGULARITY):
            # Take advantage of Singularity's native support for SCI-F.
            return '\n'.join(str(x) for x in scif_recipe)
        else:
            # Generate an external SCI-F recipe file and manually call scif

            # Temporarily switch container format to Singularity to write
            # the SCI-F recipe file
            preserved_ctype = hpccm.config.g_ctype
            hpccm.config.set_container_format('singularity')

            logging.info('Writing {}'.format(self.__scif_file))
            with open(self.__scif_file, 'w') as f:
                f.write('\n\n'.join(str(x) for x in scif_recipe))

            # Restore original container format
            hpccm.config.g_ctype = preserved_ctype

            # Container instructions to copy the SCI-F recipe file
            # into the container and then run scif
            c_scif_file = posixpath.join('/scif/recipes',
                                         os.path.basename(self.__scif_file))
            instructions = []
            instructions.append(comment('SCI-F "{}"'.format(self.__name)))
            instructions.append(
                copy(src=self.__scif_file, dest=c_scif_file))
            instructions.append(
                shell(_arguments = self.__arguments,
                      chdir=False,
                      commands=['scif install {}'.format(c_scif_file)]))

            return '\n'.join(str(x) for x in instructions)
String representation of the building block
hpccm/building_blocks/scif.py