This commit is contained in:
resteve 2013-09-26 17:21:05 +02:00
parent a25ff9b8e8
commit 19ed31d09b

View file

@ -1,12 +1,20 @@
#!/usr/bin/env python
# This file is part of account_payment_es_csb_32 module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
#This file is part account_payment_es_csb_32 module for Tryton.
#The COPYRIGHT file at the top level of this repository contains
#the full copyright notices and license terms.
from setuptools import setup
import re
import os
import ConfigParser
MODULE = 'account_payment_es_csb_32'
PREFIX = 'trytonspain'
MODULE2PREFIX = {}
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
config = ConfigParser.ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
@ -20,29 +28,32 @@ minor_version = int(minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append('trytond_%s >= %s.%s, < %s.%s' %
(dep, major_version, minor_version, major_version,
minor_version + 1))
prefix = MODULE2PREFIX.get(dep, 'trytond')
requires.append('%s_%s >= %s.%s, < %s.%s' %
(prefix, 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='trytonspain_account_payment_es_csb_32',
tests_require = ['proteus >= %s.%s, < %s.%s' %
(major_version, minor_version, major_version, minor_version + 1)]
setup(name='%s_%s' % (PREFIX, MODULE),
version=info.get('version', '0.0.1'),
description=('Tryton module to manage invoice payments and automated '
'payments through files of CSB 32 Norm.'),
author='Zikzakmedia SL',
author_email='zikzak@zikzakmedia.com',
url='http://www.zikzakmedia.com',
download_url=("https://bitbucket.org/trytonspain/"
"trytond-account_payment_es_csb_32"),
package_dir={'trytond.modules.account_payment_es_csb_32': '.'},
download_url="https://bitbucket.org/trytonspain/trytond-account_payment_es_csb_32",
package_dir={'trytond.modules.%s' % MODULE: '.'},
packages=[
'trytond.modules.account_payment_es_csb_32',
'trytond.modules.account_payment_es_csb_32.tests',
'trytond.modules.%s' % MODULE,
'trytond.modules.%s.tests' % MODULE,
],
package_data={
'trytond.modules.account_payment_es_csb_32': info.get('xml', []) \
+ ['tryton.cfg', 'locale/*.po'],
'trytond.modules.%s' % MODULE: (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', ]),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
@ -65,8 +76,8 @@ setup(name='trytonspain_account_payment_es_csb_32',
zip_safe=False,
entry_points="""
[trytond.modules]
account_payment_es_csb_32 = trytond.modules.account_payment_es_csb_32
""",
%s = trytond.modules.%s
""" % (MODULE, MODULE),
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)