Skip to content

Commit

Permalink
setup.py/finalize_options: ensure version is assigned only once
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Dec 14, 2023
1 parent 9fbddff commit 12237f4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ocrd/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ocrd_modelfactory/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ocrd_models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ocrd_network/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ocrd_validators/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12237f4

Please sign in to comment.