Simplify module information with python configuration

review363001
This commit is contained in:
Cédric Krier
2012-06-08 19:34:19 +02:00
parent f837663cf0
commit d5ecabd54f
5 changed files with 34 additions and 87 deletions
+1
View File
@@ -4,6 +4,7 @@ include TODO
include COPYRIGHT
include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include *.odt
include locale/*.po
-1
View File
@@ -2,7 +2,6 @@ trytond_purchase_invoice_line_standalone
=======================================
The account_purchase_line_standalone module of the Tryton application platform.
See __tryton__.py
Installing
----------
-73
View File
@@ -1,73 +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": "Purchase Invoice Line Standalone",
"name_bg_BG": "Ред от независима фактура към покупка",
'name_ca_ES': 'Línia de factura de compra independent',
"name_de_DE": "Einkauf ungebundene Rechnungsposition",
"name_es_AR": "Línea de factura de compra independiente",
"name_es_CO": "Línea de Factura autónoma en Compras",
"name_es_ES": "Línea de factura de compra independiente",
"name_fr_FR": "Ligne de facture autonome - Achat",
"version": "2.5.0",
"author": "B2CK",
'email': 'info@b2ck.com',
'website': 'http://www.tryton.org/',
"description": '''
Change the purchase order behaviour to create standalone invoice lines instead of a
complete invoice. This allow to compose invoices with lines originating
from differents purchases.
''',
"description_bg_BG": '''Покупка с независима фактура
- Промяна на поведението при поръчка за покупка като вместо пълна фактура
създава редове с независими фактури.
- Позволява създаване на фактури с редове от различни покупки.
''',
'description_ca_ES': '''Modifica el comportament de les comandes de compra
perquè crei línies de factura enlloc d'una factura completa. Això permet crear
factures amb línies provinents de diferents compres.
''',
"description_de_DE": '''Einkäufe mit ungebundenen Rechnungspositionen
- Ändert das Verhalten im Einkaufsvorgang, indem unabhängige Rechnungspositionen
an Stelle einer kompletten Rechnung erstellt werden.
- Ermöglicht die Zusammenstellung von Rechnungen aus Einkaufspositionen
verschiedener Einkäufe.
''',
"description_es_AR": '''
Modifica el comportamiento de la orden de compra permitiendo crear líneas
independientes en lugar de una factura completa. Esto permite componer
facturas con líneas originadas en diferentes compras.
''',
"description_es_CO": '''Modifica el comportamiento de orden de compra permitiendo crear
líneas autónomas en lugar de una factura completa. Permite componer facturas con
líneas originadas en diferentes compras.
''',
"description_es_ES": '''Modifica el comportamiento de los pedidos de compra permitiendo crear
líneas de factura independientes en lugar de una factura completa. Esto permite crear
facturas con líneas que procedan de distintas compras.
''',
"description_fr_FR": '''Modifie le comportement de l'ordre d'achat pour créer des lignes de
facture autonomes au lieu de factures complètes. Cela permet de
composer des factures avec des lignes provenant de différents achats.
''',
"depends": [
"ir",
"purchase",
"account_invoice_line_standalone",
],
"xml": [
"purchase.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',
],
}
+25 -13
View File
@@ -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_purchase_invoice_line_standalone',
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 standalone invoice line from purchase',
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.purchase_invoice_line_standalone': '.'},
packages=[
'trytond.modules.purchase_invoice_line_standalone',
'trytond.modules.purchase_invoice_line_standalone.tests',
],
],
package_data={
'trytond.modules.purchase_invoice_line_standalone': info.get('xml', []) \
+ info.get('translation', []),
},
'trytond.modules.purchase_invoice_line_standalone': \
info.get('xml', []) + ['tryton.cfg', 'locale/*.po'],
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
@@ -56,14 +67,15 @@ setup(name='trytond_purchase_invoice_line_standalone',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
],
],
license='GPL-3',
install_requires=requires,
zip_safe=False,
entry_points="""
[trytond.modules]
purchase_invoice_line_standalone = trytond.modules.purchase_invoice_line_standalone
purchase_invoice_line_standalone =
trytond.modules.purchase_invoice_line_standalone
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)
)
+8
View File
@@ -0,0 +1,8 @@
[tryton]
version=2.5.0
depends:
account_invoice_line_standalone
ir
purchase
xml:
purchase.xml