Simplify module information with python configuration

review363001
This commit is contained in:
Cédric Krier committed 2012-06-08 19:34:20 +02:00
1 parent 4c6f2ea0b6
commit 061520b991
5 files changed
+37 -62

No files matched your search

+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_shipment_cost
==============================
The purchase_shipment_cost module of the Tryton application platform.
See __tryton__.py
Installing
----------
-50
View File
@@ -1,50 +0,0 @@
# -*- coding: utf-8 -*-
#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 Shipment Cost',
'name_bg_BG': 'Управление остойностяване на доставка на покупка',
'name_de_DE': 'Einkauf Versandkosten',
'name_fr_FR': 'Coût des expéditions fournisseur',
'name_es_AR': 'Compras: Costo de envíos',
'name_es_ES': 'Coste de envío en las compras',
'version': '2.5.0',
'author': 'B2CK',
'email': 'info@b2ck.com',
'website': 'http://www.tryton.org/',
'description': 'Add purchase shipment cost',
'description_de_DE': '''
- Fügt Versandkosten für Einkäufe hinzu.
''',
'description_fr_FR': 'Ajoute la gestion des coûts des expéditions '\
'fournisseur.',
'description_es_AR': 'Añade costo de envío a la compra',
'description_es_ES': 'Añade coste de envío en las compras',
'depends': [
'ir',
'res',
'carrier',
'currency',
'stock',
],
'extras_depend': [
'account_stock_continental',
'account_product',
],
'xml': [
'stock.xml',
'carrier.xml',
],
'translation': [
'locale/bg_BG.po',
'locale/ca_ES.po',
'locale/cs_CZ.po',
'locale/de_DE.po',
'locale/fr_FR.po',
'locale/es_AR.po',
'locale/es_ES.po',
'locale/es_CO.po',
'locale/nl_NL.po',
'locale/ru_RU.po',
],
}
+22 -11
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)
@@ -31,21 +42,21 @@ tests_require = ['proteus >= %s.%s, < %s.%s' %
setup(name='trytond_purchase_shipment_cost',
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 purchase shipment cost',
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_shipment_cost': '.'},
packages=[
'trytond.modules.purchase_shipment_cost',
'trytond.modules.purchase_shipment_cost.tests',
],
],
package_data={
'trytond.modules.purchase_shipment_cost': info.get('xml', []) \
+ info.get('translation', []),
},
+ ['tryton.cfg', 'locale/*.po'],
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
@@ -66,7 +77,7 @@ setup(name='trytond_purchase_shipment_cost',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
],
],
license='GPL-3',
install_requires=requires,
extras_require=extras_require,
@@ -78,4 +89,4 @@ setup(name='trytond_purchase_shipment_cost',
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
)
)
+14
View File
@@ -0,0 +1,14 @@
[tryton]
version=2.5.0
depends:
carrier
currency
ir
res
stock
extras_depend:
account_product
account_stock_continental
xml:
stock.xml
carrier.xml