From e847b355cde8b3746efdbdc4680b600427061d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 7 Nov 2016 14:24:53 +0100 Subject: [PATCH] Fixed an issue with versioneer detecting sdist version Implicit match on \n appears to be causing issues when generating the sdist tarball under Windows. Matching against \s+ instead works reliably. Simply including the newline in the matched JSON string would also work fine. --- versioneer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioneer.py b/versioneer.py index abd58417..95d97986 100644 --- a/versioneer.py +++ b/versioneer.py @@ -1504,7 +1504,7 @@ def versions_from_file(filename): contents = f.read() except EnvironmentError: raise NotThisMethod("unable to read _version.py") - mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", + mo = re.search(r"version_json = '''\s+(.*)''' # END VERSION_JSON", contents, re.M | re.S) if not mo: raise NotThisMethod("no version_json in _version.py")