def make_named_temporary(self, identifier=None):
        """Creates a named temporary file and returns the filename for it.
        This can be usedful in some scenarious when building with external
        tools.
        """
        dir = os.path.join(self.builder.meta_path, 'tmp')
        try:
            os.makedirs(dir)
        except __HOLE__:
            pass
        fn = os.path.join(dir, 'nt-%s-%s.tmp' % (identifier or 'generic',
                                                 os.urandom(20).encode('hex')))
        self.named_temporaries.add(fn)
        return fn
dataset/ETHPy150Open lektor/lektor/lektor/builder.py/BuildState.make_named_temporary