Skip to content

Commit

Permalink
Merge pull request #55 from OCR-D/ocrd-tool-version
Browse files Browse the repository at this point in the history
setup.py: read version from ocrd-tool.json
  • Loading branch information
mikegerber authored Jan 28, 2021
2 parents 1bb72cb + a98e178 commit f00df75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README-DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ make test

Releasing
---------
* Update `ocrd-tool.json` version
* Update `setup.py` version
* Update `ocrd-tool.json` version (the `setup.py` version is read from this)
* `git commit -m 'v<version>'`
* `git tag -m 'v<version>' 'v<version>'`
* `git push --tags`
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# -*- coding: utf-8 -*-
from pathlib import Path
import json

from setuptools import setup, find_packages

with open('./ocrd-tool.json', 'r') as f:
version = json.load(f)['version']

setup(
name='ocrd_calamari',
version='1.0.1',
version=version,
description='Calamari bindings',
long_description=Path('README.md').read_text(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit f00df75

Please sign in to comment.