Skip to content

Commit 1bd11bc

Browse files
committed
Improve error message, third take
Turns out there are much more scenarios other than GitHub tarballs where setuptools-scm fails: Nix is able to build from a git commit, but will delete the `.git` folder.
1 parent e8ef5cd commit 1bd11bc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

setuptools_scm/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ def _do_parse(root, parse):
7373

7474
raise LookupError(
7575
"setuptools-scm was unable to detect version for %r.\n\n"
76-
"Make sure you're not using GitHub's tarballs (or similar ones), as "
77-
"those don't contain the necessary metadata. Use PyPI's tarballs "
78-
"instead.\n\nFor example, if you're using pip, instead of "
76+
"Make sure you're either building from a fully intact git repository "
77+
"or PyPI tarballs. Most other sources (such as GitHub's tarballs, a "
78+
"git checkout without the .git folder) don't contain the necessary "
79+
"metadata and will not work.\n\n"
80+
"For example, if you're using pip, instead of "
7981
"https://github.com/user/proj/archive/master.zip "
8082
"use git+https://github.com/user/proj.git#egg=proj" % root)
8183

0 commit comments

Comments
 (0)