Skip to content

lookup failed because git is not installed #339

@lucemia

Description

@lucemia

https://github.com/pypa/setuptools_scm/blob/7f6c9cfa52a47f4df81e753965bc37ca430e8e21/src/setuptools_scm/__init__.py#L105-L114

While git is not installed, it will also show the follow message.

"setuptools-scm was unable to detect version for %r.\n\n"
        "Make sure you're either building from a fully intact git repository "
        "or PyPI tarballs. Most other sources (such as GitHub's tarballs, a "
        "git checkout without the .git folder) don't contain the necessary "
        "metadata and will not work.\n\n"
        "For example, if you're using pip, instead of "
        "https://github.com/user/proj/archive/master.zip "
        "use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root

It will be great if the message also indicate the fact that not only .git folder, git is also required.

While using tool like docker multi-stage build or cloudbuild to minimize the image, it is common to work in an env without git pre-installed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions