This commit is contained in:
resteve 2013-09-26 17:26:50 +02:00
parent 0cf33bb5ae
commit 0d0e009cc1
1 changed files with 27 additions and 16 deletions

View File

@ -1,12 +1,20 @@
#!/usr/bin/env python
# This file is part of account_payment_es_csb_34_11 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_34_11 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_34_11'
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_34_11',
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 34-11.'),
author='Zikzakmedia SL',
author_email='zikzak@zikzakmedia.com',
url='http://www.zikzakmedia.com',
download_url=("https://bitbucket.org/trytonspain/"
"trytond-account_payment_es_csb_34_11"),
package_dir={'trytond.modules.account_payment_es_csb_34_11': '.'},
download_url="https://bitbucket.org/trytonspain/trytond-account_payment_es_csb_34_11",
package_dir={'trytond.modules.%s' % MODULE: '.'},
packages=[
'trytond.modules.account_payment_es_csb_34_11',
'trytond.modules.account_payment_es_csb_34_11.tests',
'trytond.modules.%s' % MODULE,
'trytond.modules.%s.tests' % MODULE,
],
package_data={
'trytond.modules.account_payment_es_csb_34_11': 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_34_11',
zip_safe=False,
entry_points="""
[trytond.modules]
account_payment_es_csb_34_11 = trytond.modules.account_payment_es_csb_34_11
""",
%s = trytond.modules.%s
""" % (MODULE, MODULE),
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)