From 81d1a8290e861979063da7ee6319cd5877318217 Mon Sep 17 00:00:00 2001 From: tqfx Date: Sun, 31 Mar 2024 12:02:07 +0800 Subject: [PATCH] fix `python2 setup.py build` problem when setup.cfg ends with CRLF --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d15cf5b..d1c012a 100755 --- a/setup.py +++ b/setup.py @@ -81,7 +81,7 @@ def check_math(text=""): def configure(config): with open("setup.cfg", "r") as f: - version = findall(r"version = (.+)", f.read())[0] + version = findall(r"version = (\S+)", f.read())[0] major, minor, patch = findall(r"(\d+).(\d+).(\d+)", version)[0] order = {"little": 1234, "big": 4321}.get(byteorder) vsize = ctypes.sizeof(ctypes.c_void_p(0)) -- 2.11.4.GIT