summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/setuptools_scm/git.py2
-rw-r--r--testing/test_git.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/setuptools_scm/git.py b/src/setuptools_scm/git.py
index afefa34..76be436 100644
--- a/src/setuptools_scm/git.py
+++ b/src/setuptools_scm/git.py
@@ -12,7 +12,7 @@ except ImportError:
from .win_py31_compat import samefile
-DEFAULT_DESCRIBE = "git describe --dirty --tags --long --match *.*"
+DEFAULT_DESCRIBE = "git describe --dirty --tags --long --match *[0-9]*"
class GitWorkdir(object):
diff --git a/testing/test_git.py b/testing/test_git.py
index 337efdd..8416571 100644
--- a/testing/test_git.py
+++ b/testing/test_git.py
@@ -233,6 +233,14 @@ def test_not_matching_tags(wd):
).startswith("0.11.2")
+@pytest.mark.issue("https://github.com/pypa/setuptools_scm/issues/411")
+def test_non_dotted_version(wd):
+ wd.commit_testfile()
+ wd("git tag apache-arrow-1")
+ wd.commit_testfile()
+ assert wd.get_version().startswith("2")
+
+
@pytest.mark.issue("https://github.com/pypa/setuptools_scm/issues/381")
def test_gitdir(monkeypatch, wd):
"""