def require_metadata():
    "Prevent improper installs without necessary metadata. See #659"
    egg_info_dir = os.path.join(here, 'setuptools.egg-info')
    if not os.path.exists(egg_info_dir):
        msg = (
            "Cannot build setuptools without metadata. "
            "Run `bootstrap.py`."
        )
        raise RuntimeError(msg)
Prevent improper installs without necessary metadata. See #659