From e58c132ee7b5cbbb10bf02bb3e51c6e785202827 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Mon, 22 Jun 2009 12:18:01 +0200 Subject: [PATCH] Minor code cleanup in setup.py --- setup.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index ce3336eb49..8bdb635548 100644 --- a/setup.py +++ b/setup.py @@ -9,17 +9,12 @@ info = eval(file('__tryton__.py').read()) requires = [] for dep in info.get('depends', []): - match = re.compile( - '(ir|res|workflow|webdav)((\s|$|<|>|<=|>=|==|!=).*?$)').match(dep) - if match: - continue - else: - dep = 'trytond_' + dep - requires.append(dep) + if not re.match(r'(ir|res|workflow|webdav)(\W|$)', dep): + requires.append('trytond_' + dep) major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2) requires.append('trytond >= %s.%s' % (major_version, minor_version)) -requires.append('trytond < %s.%s' % (major_version, str(int(minor_version) + 1))) +requires.append('trytond < %s.%s' % (major_version, int(minor_version) + 1)) setup(name='trytond_product_cost_fifo', version=info.get('version', '0.0.1'),