diff --git a/MANIFEST.in b/MANIFEST.in index 7f5d5fdaf4..44969c7156 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include TODO include COPYRIGHT include CHANGELOG include LICENSE +include tryton.cfg include *.xml include *.odt include locale/*.po diff --git a/README b/README index 0003e0b0d3..018f4a0248 100644 --- a/README +++ b/README @@ -2,7 +2,6 @@ trytond_analytic_account ======================== The analytic_account module of the Tryton application platform. -See __tryton__.py Installing ---------- diff --git a/__tryton__.py b/__tryton__.py deleted file mode 100644 index 27c820a035..0000000000 --- a/__tryton__.py +++ /dev/null @@ -1,89 +0,0 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. -{ - 'name': 'Analytic Account', - 'name_bg_BG': 'Аналитична сметка', - 'name_ca_ES': 'Comptabilitat analítica', - 'name_de_DE': 'Kostenstellen', - 'name_es_AR': 'Contabilidad Analítica', - 'name_es_CO': 'Contabilidad Analítica', - 'name_es_ES': 'Contabilidad analítica', - 'name_fr_FR': 'Comptabilité analytique', - 'version': '2.5.0', - 'author': 'B2CK', - 'email': 'info@b2ck.com', - 'website': 'http://www.tryton.org/', - 'description': '''Financial and Accounting Module with: - - Analytic accounting with any number of analytic charts - -And with report: - - Analytic account balance -''', - 'description_bg_BG': '''Финансов и счетоводен модул с: - - Аналитично счетоводство с произволен брой аналитични графики - -Прилежащи справки: - - Баланс на аналитична сметка -''', - 'description_ca_ES': '''Mòdul financer i comptable amb: - - Comptabilitat analítica amb plans analítics il·limitats - -I amb informes: - - Balanç comptable analític -''', - 'description_de_DE': '''Modul für Buchhhaltung mit: - - Kostenstellen mit einer beliebigen Anzahl von Tabellen - -Zugehörige Berichte: - - Plan für Kostenstellen -''', - 'description_es_AR': '''Módulo financiero y de contabilidad con: - - Contabilidad analítica con cualquier cantidad de planes analíticos - -Y con informes: - - Balance contable analítico -''', - 'description_es_CO': '''Módulo Financiero y de Contabilidad con: - - Contabilidad Analítica con cualquier cantidad de planes analíticos - -Y con reportes: - - Balance Contable Analítico -''', - 'description_es_ES': '''Módulo financiero y contable con: - - Contabilidad analítica con planes analíticos ilimitados - -Y con informes: - - Balance contable analítico -''', - 'description_fr_FR': '''Module comptable et financier, avec: - - Comptabilité analytique autorisant un nombre arbitraire d'axes. - -Et le rapport: - - Balance comptable analytique -''', - 'depends': [ - 'ir', - 'company', - 'currency', - 'account', - 'party', - 'res', - ], - 'xml': [ - 'analytic_account.xml', - 'account.xml', - 'line.xml', - ], - 'translation': [ - 'locale/bg_BG.po', - 'locale/ca_ES.po', - 'locale/cs_CZ.po', - 'locale/de_DE.po', - 'locale/es_AR.po', - 'locale/es_CO.po', - 'locale/es_ES.po', - 'locale/fr_FR.po', - 'locale/nl_NL.po', - 'locale/ru_RU.po', - ], -} diff --git a/setup.py b/setup.py index df4e934ac4..51833b295b 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,19 @@ from setuptools import setup import re +import os +import ConfigParser -info = eval(open('__tryton__.py').read()) + +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')) +for key in ('depends', 'extras_depend', 'xml'): + if key in info: + info[key] = info[key].strip().splitlines() major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2) major_version = int(major_version) minor_version = int(minor_version) @@ -21,21 +32,21 @@ requires.append('trytond >= %s.%s, < %s.%s' % setup(name='trytond_analytic_account', version=info.get('version', '0.0.1'), - description=info.get('description', ''), - author=info.get('author', ''), - author_email=info.get('email', ''), - url=info.get('website', ''), + description='Tryton module for analytic accounting', + long_description=read('README'), + author='Tryton', + url='http://www.tryton.org/', download_url="http://downloads.tryton.org/" + \ - info.get('version', '0.0.1').rsplit('.', 1)[0] + '/', + info.get('version', '0.0.1').rsplit('.', 1)[0] + '/', package_dir={'trytond.modules.analytic_account': '.'}, packages=[ 'trytond.modules.analytic_account', 'trytond.modules.analytic_account.tests', - ], + ], package_data={ 'trytond.modules.analytic_account': info.get('xml', []) \ - + info.get('translation', []), - }, + + ['tryton.cfg', 'locale/*.po'], + }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', @@ -57,7 +68,7 @@ setup(name='trytond_analytic_account', 'Programming Language :: Python :: 2.7', 'Topic :: Office/Business', 'Topic :: Office/Business :: Financial :: Accounting', - ], + ], license='GPL-3', install_requires=requires, zip_safe=False, @@ -67,4 +78,4 @@ setup(name='trytond_analytic_account', """, test_suite='tests', test_loader='trytond.test_loader:Loader', -) + ) diff --git a/tryton.cfg b/tryton.cfg new file mode 100644 index 0000000000..aef08c1df7 --- /dev/null +++ b/tryton.cfg @@ -0,0 +1,13 @@ +[tryton] +version=2.5.0 +depends: + account + company + currency + ir + party + res +xml: + analytic_account.xml + account.xml + line.xml