trytond-account_code_digits/setup.py

72 lines
2.5 KiB
Python
Raw Normal View History

2012-05-01 11:03:03 +02:00
#!/usr/bin/env python
2013-01-18 16:40:35 +01:00
# -*- encoding: utf-8 -*-
2012-08-27 10:56:18 +02:00
#This file is part account_code_digits module for Tryton.
#The COPYRIGHT file at the top level of this repository contains
#the full copyright notices and license terms.
2012-05-01 11:03:03 +02:00
from setuptools import setup
import re
import os
import ConfigParser
2012-05-01 11:03:03 +02:00
config = ConfigParser.ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
2012-05-01 11:03:03 +02:00
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
requires = []
2012-05-01 11:03:03 +02:00
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
2012-05-01 11:03:03 +02:00
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))
2012-12-28 13:38:08 +01:00
setup(name='trytonspain_account_code_digits',
2012-05-01 11:03:03 +02:00
version=info.get('version', '0.0.1'),
description='Tryton module to expand account codes',
author='NaN·tic',
author_email='info@NaN-tic.com',
url='http://www.nan-tic.com',
2012-12-28 11:32:28 +01:00
download_url="https://bitbucket.org/trytonspain/trytond-account_code_digits",
2012-11-13 16:05:21 +01:00
package_dir={'trytond.modules.account_code_digits': '.'},
2012-05-01 11:03:03 +02:00
packages=[
2012-11-13 16:05:21 +01:00
'trytond.modules.account_code_digits',
'trytond.modules.account_code_digits.tests',
2012-05-01 11:03:03 +02:00
],
package_data={
2012-11-13 16:05:21 +01:00
'trytond.modules.account_code_digits': info.get('xml', []) \
+ ['tryton.cfg', 'locale/*.po'],
2012-05-01 11:03:03 +02:00
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Catalan',
2012-05-01 11:03:03 +02:00
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
install_requires=requires,
zip_safe=False,
entry_points="""
2012-11-13 16:05:21 +01:00
[trytond.modules]
account_code_digits = trytond.modules.account_code_digits
2012-05-01 11:03:03 +02:00
""",
test_suite='tests',
2012-11-13 16:05:21 +01:00
test_loader='trytond.test_loader:Loader',
2012-05-01 11:03:03 +02:00
)