Improve requires of setup.py for issue1420
Add version constraint on other modules Use one line constraint for trytond Remove unused find_packages
This commit is contained in:
@@ -2,19 +2,22 @@
|
||||
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools import setup
|
||||
import re
|
||||
|
||||
info = eval(file('__tryton__.py').read())
|
||||
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
|
||||
major_version = int(major_version)
|
||||
minor_version = int(minor_version)
|
||||
|
||||
requires = ['python-dateutil']
|
||||
for dep in info.get('depends', []):
|
||||
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, int(minor_version) + 1))
|
||||
requires.append('trytond_%s >= %s.%s, < %s.%s' %
|
||||
(dep, major_version, minor_version, major_version,
|
||||
minor_version + 1))
|
||||
requires.append('trytond >= %s.%s, < %s.%s' %
|
||||
(major_version, minor_version, major_version, minor_version + 1))
|
||||
|
||||
setup(name='trytond_account',
|
||||
version=info.get('version', '0.0.1'),
|
||||
|
||||
Reference in New Issue
Block a user