def distutils_dir_name(dname):
    """Returns the name of a distutils build directory

    Parameters
    ----------
    dname : str
        Base directory name

    Returns
    -------
    Name of a distutils build directory

    """
    import sys
    import sysconfig
    f = '{dirname}.{platform}-{version[0]}.{version[1]}'
    return f.format(dirname=dname, platform=sysconfig.get_platform(),
        version=sys.version_info)
