Passed
Push — master ( 8a8c1e...4684d4 )
by Konstantin
03:14
created

setup.build.finalize_options()   A

Complexity

Conditions 2

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
nop 1
1
# -*- coding: utf-8 -*-
2
from setuptools import setup, Command
3
from setuptools.command.build import build as orig_build
4
5
class build(orig_build):
6
    def finalize_options(self):
7
        vers = ' == ' + self.distribution.metadata.version
8
        self.distribution.install_requires = [
9
            req + vers if req.startswith('ocrd') and '==' not in req else req
10
            for req in self.distribution.install_requires
11
        ]
12
        orig_build.finalize_options(self)
13
14
setup(
15
    cmdclass={"build": build}
16
)
17