def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    contents = "\n".join(contents)

    # assuming the contents has been vetted for utf-8 encoding
    contents = contents.encode("utf-8")

    with open(filename, "wb") as f:  # always write POSIX-style manifest
        f.write(contents)
Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    
product/gradle-plugin/src/main/python/setuptools/command/egg_info.py