def _long_description(dist: "Distribution", val: _DictOrStr, root_dir: _Path):
    from setuptools.config import expand

    if isinstance(val, str):
        text = expand.read_files(val, root_dir)
        ctype = _guess_content_type(val)
    else:
        text = val.get("text") or expand.read_files(val.get("file", []),
                                                    root_dir)
        ctype = val["content-type"]

    _set_config(dist, "long_description", text)
    if ctype:
        _set_config(dist, "long_description_content_type", ctype)
def _license(dist: "Distribution", val: dict, root_dir: _Path):
    from setuptools.config import expand

    if "file" in val:
        _set_config(dist, "license", expand.read_files([val["file"]],
                                                       root_dir))
    else:
        _set_config(dist, "license", val["text"])