Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lookup failed because git is not installed #339

Closed
lucemia opened this issue May 26, 2019 · 1 comment · Fixed by #503
Closed

lookup failed because git is not installed #339

lucemia opened this issue May 26, 2019 · 1 comment · Fixed by #503

Comments

@lucemia
Copy link

lucemia commented May 26, 2019

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.

@matthijskooijman
Copy link

Looks like a duplicate of #363 (or maybe that one is duplicate of this, but that one has more specific info and an IMHO better proposal for improvement).

RonnyPfannschmidt added a commit to RonnyPfannschmidt/setuptools_scm that referenced this issue Dec 6, 2020
RonnyPfannschmidt added a commit that referenced this issue Dec 6, 2020
…ing-commands

[breaking] fix #339: error when targetted scm parsing fails for missi…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment