Commit aaa3b275 authored by Jerome Flesch's avatar Jerome Flesch

setup.py: Fix package version on Windows/Msys2

parent 25dc2bcf
......@@ -32,8 +32,11 @@ if os.name == 'nt':
version = version.stdout.decode("utf-8").strip()
with open('src/pyocr/_version.py', 'w') as fd:
fd.write("# coding: utf-8\n")
fd.write("version = '{}'\n".format(version))
else:
with open("src/pyocr/_version.py", "r") as fd:
version = fd.read().strip()
version = version.split(" ")[2][1:-1]
else:
setup_deps = [
'setuptools_scm',
......@@ -42,6 +45,7 @@ else:
scm_version = {
'write_to': 'src/pyocr/_version.py',
}
version = None
setup(
......@@ -49,6 +53,7 @@ setup(
description=("A Python wrapper for OCR engines (Tesseract, Cuneiform,"
" etc)"),
keywords="tesseract cuneiform ocr",
version=version,
url="https://gitlab.gnome.org/World/OpenPaperwork/pyocr",
classifiers=[
"Development Status :: 5 - Production/Stable",
......
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