def METHOD_NAME(monkeypatch, tmpdir):
    monkeypatch.chdir(MAIN_DIR)
    monkeypatch.setenv("PYBIND11_GLOBAL_SDIST", "1")
    out = subprocess.check_output(
        [
            sys.executable,
            "-m",
            "build",
            "--sdist",
            "--outdir",
            str(tmpdir),
        ]
    )
    if hasattr(out, "decode"):
        out = out.decode()
    (sdist,) = tmpdir.visit("*.tar.gz")
    with tarfile.open(str(sdist), "r:gz") as tar:
        start = tar.getnames()[0] + "/"
        version = start[16:-1]
        simpler = {n.split("/", 1)[-1] for n in tar.getnames()[1:]}
        with contextlib.closing(
            tar.extractfile(tar.getmember(start + "setup.py"))
        ) as f:
            setup_py = f.read()
        with contextlib.closing(
            tar.extractfile(tar.getmember(start + "pyproject.toml"))
        ) as f:
            pyproject_toml = f.read()
    files = {f"pybind11/{n}" for n in all_files}
    files |= sdist_files
    files |= {f"pybind11_global{n}" for n in local_sdist_files}
    assert simpler == files
    with open(os.path.join(MAIN_DIR, "tools", "setup_global.py.in"), "rb") as f:
        contents = (
            string.Template(f.read().decode())
            .substitute(version=version, extra_cmd="")
            .encode()
        )
        assert setup_py == contents
    with open(os.path.join(MAIN_DIR, "tools", "pyproject.toml"), "rb") as f:
        contents = f.read()
        assert pyproject_toml == contents