Passed
Pull Request — master (#1065)
by Konstantin
03:02
created

setup   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build.finalize_options() 0 7 2
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