Commit f4b068cd authored by Jerome Flesch's avatar Jerome Flesch

0.7.2: fix setup.py on Windows

Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@openpaper.work>
parent 5eed9739
Pipeline #90104 passed with stage
in 6 minutes and 11 seconds
22/06/2019 - 0.7.2:
- Fix setup.py on Windows
22/06/2019 - 0.7.1:
- tesseract.can_detect_orientation(): only returns True if 'osd' date files are
installed
......
......@@ -21,6 +21,8 @@ Make sure you have pip >= 9.0.1.
if os.name == 'nt':
setup_deps = []
scm_version = {}
# setuptools_scm doesn't work in MSYS2
if not os.path.exists('src/pyocr/_version.py'):
version = subprocess.run(
......@@ -35,7 +37,7 @@ if os.name == 'nt':
else:
with open("src/pyocr/_version.py", "r") as fd:
for line in fd.readlines():
if line[0] != '#':
if line[0] != '#' and line.strip() != '':
version = line.strip()
version = version.split(" ")[2][1:-1]
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment