trytond-account_invoice_con.../setup.py

72 lines
2.7 KiB
Python
Raw Normal View History

2012-08-27 12:19:36 +02:00
#!/usr/bin/env python
2012-08-27 12:35:30 +02:00
#This file is part account_invoice_consecutive module for Tryton.
#The COPYRIGHT file at the top level of this repository contains
#the full copyright notices and license terms.
2012-08-27 12:19:36 +02:00
from setuptools import setup
import re
2012-10-17 11:18:43 +02:00
import os
import ConfigParser
2012-08-27 12:19:36 +02:00
2012-10-17 11:18:43 +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-08-27 12:19:36 +02:00
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
2012-08-27 12:38:00 +02:00
requires = []
2012-08-27 12:19:36 +02:00
for dep in info.get('depends', []):
2012-08-27 12:38:00 +02:00
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
2012-08-27 12:19:36 +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-08-27 12:38:00 +02:00
setup(name='trytond_account_invoice_consecutive',
2012-08-27 12:19:36 +02:00
version=info.get('version', '0.0.1'),
2012-10-17 11:18:43 +02:00
description='Tryton module ensures new invoices do not have a date' \
'previous to the latest invoice in the sequence',
author='NaN·tic',
author_email='info@NaN-tic.com',
url='http://www.nan-tic.com',
2012-08-27 12:38:00 +02:00
download_url="https://bitbucket.org/albertnan/account_invoice_consecutive",
2012-08-27 12:19:36 +02:00
package_dir={'trytond.modules.account_invoice_consecutive': '.'},
packages=[
'trytond.modules.account_invoice_consecutive',
'trytond.modules.account_invoice_consecutive.tests',
2012-08-27 12:38:00 +02:00
],
2012-08-27 12:19:36 +02:00
package_data={
2012-08-27 12:38:00 +02:00
'trytond.modules.account_invoice_consecutive': info.get('xml', []) \
2012-10-17 11:18:43 +02:00
+ ['tryton.cfg', 'locale/*.po'],
2012-08-27 12:38:00 +02:00
},
2012-08-27 12:19:36 +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)',
2012-08-27 12:38:00 +02:00
'Natural Language :: Catalan',
'Natural Language :: Spanish',
2012-08-27 12:19:36 +02:00
'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="""
[trytond.modules]
account_invoice_consecutive = trytond.modules.account_invoice_consecutive
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)