2012-08-27 12:19:36 +02:00
|
|
|
#!/usr/bin/env python
|
2013-01-18 16:42:56 +01:00
|
|
|
# -*- encoding: utf-8 -*-
|
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 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-12-28 13:39:41 +01:00
|
|
|
setup(name='trytonspain_account_invoice_consecutive',
|
2012-08-27 12:19:36 +02:00
|
|
|
version=info.get('version', '0.0.1'),
|
2012-11-13 13:10:11 +01:00
|
|
|
description='Tryton module ensures new invoices do not have a date'
|
2012-10-17 11:18:43 +02:00
|
|
|
'previous to the latest invoice in the sequence',
|
|
|
|
author='NaN·tic',
|
|
|
|
author_email='info@NaN-tic.com',
|
|
|
|
url='http://www.nan-tic.com',
|
2012-12-28 11:33:22 +01:00
|
|
|
download_url="https://bitbucket.org/trytonspain/trytond-account_invoice_consecutive",
|
2012-11-13 16:05:23 +01:00
|
|
|
package_dir={'trytond.modules.account_invoice_consecutive': '.'},
|
2012-08-27 12:19:36 +02:00
|
|
|
packages=[
|
2012-11-13 16:05:23 +01:00
|
|
|
'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-11-13 16:05:23 +01: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="""
|
2012-11-13 16:05:23 +01:00
|
|
|
[trytond.modules]
|
|
|
|
account_invoice_consecutive = trytond.modules.account_invoice_consecutive
|
2012-08-27 12:19:36 +02:00
|
|
|
""",
|
|
|
|
test_suite='tests',
|
2012-11-13 16:05:23 +01:00
|
|
|
test_loader='trytond.test_loader:Loader',
|
2012-08-27 12:19:36 +02:00
|
|
|
)
|