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 845a5ed963..08c010093e 100644 --- a/README +++ b/README @@ -2,7 +2,6 @@ trytond_account_invoice ======================= The account_invoice module of the Tryton application platform. -See __tryton__.py Installing ---------- diff --git a/__tryton__.py b/__tryton__.py deleted file mode 100644 index cce82c989e..0000000000 --- a/__tryton__.py +++ /dev/null @@ -1,137 +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': 'Account Invoice', - 'name_bg_BG': 'Фактуриране', - 'name_ca_ES': 'Facturació', - 'name_de_DE': 'Fakturierung', - 'name_es_AR': 'Facturación', - 'name_es_CO': 'Facturación', - 'name_es_ES': 'Facturación', - 'name_fr_FR': 'Facturation', - 'name_nl_NL': 'Facturatie', - 'version': '2.5.0', - 'author': 'B2CK', - 'email': 'info@b2ck.com', - 'website': 'http://www.tryton.org/', - 'description': '''Financial and Accounting Module with: - - Payment Term - - Invoice / Credit Note - - Supplier Invoice / Supplier Credit Note - -With the possibilities: - - to follow the payment of the invoices. - - to define invoice sequences on fiscal year or period. - - to credit any invoice. -''', - 'description_bg_BG': '''Финансов и счетоводен модул с: - - Условия за плащане - - Фактура / Кредитно известие - - Фактура за доставчик / Кредитно известие за доставчик - -Има следните възможности: - - проследяване на плащания на фактури - - задаване на последователности на фактура за финансова година или период - - кредитиране на всяка фактура -''', - 'description_ca_ES': '''Mòdul financer i comptable amb: - - Terminis de pagament - - Factura / Abonament - - Factura de proveïdor / Abonament de proveïdor - -Amb les possibilitats de: - - Fer el seguiment del pagament de factures. - - Definir seqüències de factures per exercici fiscal o període. - - Abonar qualsevol factura. -''', - 'description_de_DE': '''Modul für Buchhaltung und Fakturierung mit: - - Definition von Zahlungsbedingungen - - Erstellung von Rechnungen und Gutschriften für Kunden - - Erstellung von Rechnungen und Gutschriften für Lieferanten - -Ermöglicht: - - die Verfolgung der Bezahlung von Rechnungen - - die Definition von Rechnungssequenzen für das Geschäftsjahr bzw. die Buchungszeiträume - - die Erstellung von Gutschriften zu jeglicher Rechnung -''', - 'description_es_AR': '''Módulo financiero y de contabilidad con: - - Plazos de Pago - - Factura / Nota de crédito - - Factura de proveedor / Nota de crédito de proveedor - -Con las posibilidades de: - - hacer seguimientos del pago de facturas. - - definir secuencias de facturas por ejercicio fiscal o período. - - pagar cualquier factura. -''', - 'description_es_CO': '''Módulo Financiero y de Contabilidad con: - - Términos de Pago - - Notas de Facturación / Crédito - - Factura de Proveedores / Nota de Crédito de Proveedores - -Con las posibilidades de: - - Hacer seguimiento al pago de facturas. - - Definir secuencias de facturas en año o período fiscal. - - Acreditar una factura. -''', - 'description_es_ES': '''Módulo financiero y contable con: - - Plazos de pago - - Factura / Abono - - Factura de proveedor / Abono de proveedor - -Con las posibilidades de: - - Hacer el seguimiento del pago de facturas. - - Definir secuencias de facturas por ejercicio fiscal o período. - - Abonar cualquier factura. -''', - 'description_fr_FR': '''Module financier et comptable avec: - - Condition de paiement - - Facture / Note de crédit - - Facture fournisseur / Note de crédit fournisseur - -Avec la possibilité: - - de suivre le paiment des factures - - de définir les numérotations de facture par période ou par année fiscale - - de créditer n'importe quelle facture - -''', - 'description_nl_NL': '''Module voor facturering met: - - Betalingstermijnen - - Verkoopfacturen / Credit verkoopnota's - - Inkoopfacturen / Credit inkoopnota's - -Met de mogelijkheid tot: - - het volgen van betalingen. - - het definiëren van factuurreeksen per boekjaar. - - het crediteren van een factuur. - -''', - 'depends': [ - 'ir', - 'account', - 'company', - 'party', - 'product', - 'res', - 'currency', - 'account_product', - ], - 'xml': [ - 'invoice.xml', - 'payment_term.xml', - 'party.xml', - 'account.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 96ff6542f0..e512b683ae 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,22 +32,21 @@ requires.append('trytond >= %s.%s, < %s.%s' % setup(name='trytond_account_invoice', 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 invoicing', + long_description=open('README').read(), + 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.account_invoice': '.'}, packages=[ 'trytond.modules.account_invoice', 'trytond.modules.account_invoice.tests', - ], + ], package_data={ 'trytond.modules.account_invoice': info.get('xml', []) \ - + info.get('translation', []) \ - + ['invoice.odt'], - }, + + ['tryton.cfg', 'locale/*.po', 'invoice.odt'], + }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', @@ -58,7 +68,7 @@ setup(name='trytond_account_invoice', 'Programming Language :: Python :: 2.7', 'Topic :: Office/Business', 'Topic :: Office/Business :: Financial :: Accounting', - ], + ], license='GPL-3', install_requires=requires, zip_safe=False, @@ -68,4 +78,4 @@ setup(name='trytond_account_invoice', """, test_suite='tests', test_loader='trytond.test_loader:Loader', -) + ) diff --git a/tryton.cfg b/tryton.cfg new file mode 100644 index 0000000000..2a558b8c0a --- /dev/null +++ b/tryton.cfg @@ -0,0 +1,16 @@ +[tryton] +version=2.5.0 +depends: + account + account_product + company + currency + ir + party + product + res +xml: + invoice.xml + payment_term.xml + party.xml + account.xml