From 80ef57d2ada5663e51546d7d3d4bd7ce5f049213 Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Tue, 30 Jan 2024 20:12:04 +0100 Subject: [PATCH] {pypi,build}-workaround: missed a commit, s/get_distribution(...).version/dist_version(...) --- .gitignore | 1 + Makefile | 2 +- src/ocrd/cli/__init__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index aff9382067..0f3fe4bbb1 100644 --- a/.gitignore +++ b/.gitignore @@ -126,3 +126,4 @@ sanders* ws1 *.doctrees .vscode +*.BAK diff --git a/Makefile b/Makefile index 5df74e18ea..b826e793d6 100644 --- a/Makefile +++ b/Makefile @@ -322,7 +322,7 @@ build-workaround: pyclean cp src/ocrd/cli/__init__.py src/ocrd/cli/__init__.py.BAK for dist in $(BUILD_ORDER);do \ cat pyproject.toml.BAK | sed "s,^name =.*,name = \"$$dist\"," > pyproject.toml; \ - cat src/ocrd_utils/constants.py.BAK | sed "s,get_distribution('ocrd'),get_distribution('$$dist')," > src/ocrd_utils/constants.py; \ + cat src/ocrd_utils/constants.py.BAK | sed "s,dist_version('ocrd'),dist_version('$$dist')," > src/ocrd_utils/constants.py; \ cat src/ocrd/cli/__init__.py.BAK | sed "s,package_name='ocrd',package_name='$$dist'," > src/ocrd/cli/__init__.py; \ $(MAKE) build; \ done diff --git a/src/ocrd/cli/__init__.py b/src/ocrd/cli/__init__.py index 97cff1db7f..9bfa212764 100644 --- a/src/ocrd/cli/__init__.py +++ b/src/ocrd/cli/__init__.py @@ -81,7 +81,7 @@ def get_help(self, ctx): @click.group(epilog=_epilog) -@click.version_option() +@click.version_option(package_name='ocrd') @ocrd_loglevel def cli(**kwargs): # pylint: disable=unused-argument """