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.
This commit is contained in:
Gina Häußge 2016-11-07 14:24:53 +01:00
parent 970880dee6
commit e847b355cd

2
versioneer.py vendored
View file

@ -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")