From 12237f4d3bdc9ada2f0304e32999051de878d16b Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Thu, 14 Dec 2023 20:13:12 +0100 Subject: [PATCH] setup.py/finalize_options: ensure version is assigned only once --- ocrd/setup.py | 2 +- ocrd_modelfactory/setup.py | 2 +- ocrd_models/setup.py | 2 +- ocrd_network/setup.py | 2 +- ocrd_validators/setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ocrd/setup.py b/ocrd/setup.py index a675ab4c9..929849c9f 100644 --- a/ocrd/setup.py +++ b/ocrd/setup.py @@ -6,7 +6,7 @@ class build(orig_build): def finalize_options(self): vers = ' == ' + self.distribution.metadata.version self.distribution.install_requires = [ - req + vers if req.startswith('ocrd') else req + req + vers if req.startswith('ocrd') and '==' not in req else req for req in self.distribution.install_requires ] orig_build.finalize_options(self) diff --git a/ocrd_modelfactory/setup.py b/ocrd_modelfactory/setup.py index a675ab4c9..929849c9f 100644 --- a/ocrd_modelfactory/setup.py +++ b/ocrd_modelfactory/setup.py @@ -6,7 +6,7 @@ class build(orig_build): def finalize_options(self): vers = ' == ' + self.distribution.metadata.version self.distribution.install_requires = [ - req + vers if req.startswith('ocrd') else req + req + vers if req.startswith('ocrd') and '==' not in req else req for req in self.distribution.install_requires ] orig_build.finalize_options(self) diff --git a/ocrd_models/setup.py b/ocrd_models/setup.py index a675ab4c9..929849c9f 100644 --- a/ocrd_models/setup.py +++ b/ocrd_models/setup.py @@ -6,7 +6,7 @@ class build(orig_build): def finalize_options(self): vers = ' == ' + self.distribution.metadata.version self.distribution.install_requires = [ - req + vers if req.startswith('ocrd') else req + req + vers if req.startswith('ocrd') and '==' not in req else req for req in self.distribution.install_requires ] orig_build.finalize_options(self) diff --git a/ocrd_network/setup.py b/ocrd_network/setup.py index a675ab4c9..929849c9f 100644 --- a/ocrd_network/setup.py +++ b/ocrd_network/setup.py @@ -6,7 +6,7 @@ class build(orig_build): def finalize_options(self): vers = ' == ' + self.distribution.metadata.version self.distribution.install_requires = [ - req + vers if req.startswith('ocrd') else req + req + vers if req.startswith('ocrd') and '==' not in req else req for req in self.distribution.install_requires ] orig_build.finalize_options(self) diff --git a/ocrd_validators/setup.py b/ocrd_validators/setup.py index a675ab4c9..929849c9f 100644 --- a/ocrd_validators/setup.py +++ b/ocrd_validators/setup.py @@ -6,7 +6,7 @@ class build(orig_build): def finalize_options(self): vers = ' == ' + self.distribution.metadata.version self.distribution.install_requires = [ - req + vers if req.startswith('ocrd') else req + req + vers if req.startswith('ocrd') and '==' not in req else req for req in self.distribution.install_requires ] orig_build.finalize_options(self)