Simplify module information with python configuration
review363001
This commit is contained in:
@@ -4,6 +4,7 @@ include TODO
|
||||
include COPYRIGHT
|
||||
include CHANGELOG
|
||||
include LICENSE
|
||||
include tryton.cfg
|
||||
include *.xml
|
||||
include *.odt
|
||||
include locale/*.po
|
||||
|
||||
@@ -2,7 +2,6 @@ trytond_stock_inventory_location
|
||||
================================
|
||||
|
||||
The stock_inventory_location module of the Tryton application platform.
|
||||
See __tryton__.py
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
@@ -1,61 +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': 'Stock Inventory for many locations',
|
||||
'name_bg_BG': 'Инвентаризация на наличност за много местонахождения',
|
||||
'name_ca_ES': 'Inventari de moltes ubicacions',
|
||||
'name_de_DE': 'Lagerverwaltung Bestandskorrektur für mehrere Lagerorte',
|
||||
'name_es_AR': 'Inventario de existencias para muchas ubicaciones',
|
||||
'name_es_CO': 'Inventario de existencias para muchas ubicaciones',
|
||||
'name_es_ES': 'Inventario de stock para muchas ubicaciones',
|
||||
'name_fr_FR': 'Inventaire de stock par liste de locations',
|
||||
'version': '2.5.0',
|
||||
'author': 'B2CK',
|
||||
'email': 'info@b2ck.com',
|
||||
'website': 'http://www.tryton.org/',
|
||||
'description': '''Add a wizard that allows to create automatically inventories for a
|
||||
given list of locations.
|
||||
''',
|
||||
'description_bg_BG': '''Добавя помощник, който позволява създаване на автоматични
|
||||
инвентаризации за зададен списък от местонахождения
|
||||
''',
|
||||
'description_ca_ES': '''Afegeix un assistent per permetre crear inventaris
|
||||
automàtics per a una llista d'ubicacions donada.''',
|
||||
'description_de_DE': '''Bestandskorrektur für mehrere Lagerorte
|
||||
- Fügt einen Wizard hinzu, der automatisch die Lagerbestände für eine Liste
|
||||
von Lagerorten erzeugt.
|
||||
''',
|
||||
'description_es_AR': '''Añade un asistente que permite crear inventarios
|
||||
automáticos para una lista dada de ubicaciones.
|
||||
''',
|
||||
'description_es_CO': '''Añade un asistente que permite crear inventarios
|
||||
automáticos para una lista dada de ubicaciones.
|
||||
''',
|
||||
'description_es_ES': '''Añade un asistente que permite crear inventarios
|
||||
automáticos para una lista dada de ubicaciones.
|
||||
''',
|
||||
'description_fr_FR': '''Ajoute un wizard qui permet de créer automatiquement des inventaires
|
||||
pour une liste donnée d'emplacements.
|
||||
''',
|
||||
'depends': [
|
||||
'ir',
|
||||
'stock',
|
||||
'company',
|
||||
'product',
|
||||
],
|
||||
'xml': [
|
||||
'inventory.xml',
|
||||
],
|
||||
'translation': [
|
||||
'locale/cs_CZ.po',
|
||||
'locale/bg_BG.po',
|
||||
'locale/ca_ES.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',
|
||||
],
|
||||
}
|
||||
@@ -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_stock_inventory_location',
|
||||
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 to create inventories by locations',
|
||||
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.stock_inventory_location': '.'},
|
||||
packages=[
|
||||
'trytond.modules.stock_inventory_location',
|
||||
'trytond.modules.stock_inventory_location.tests',
|
||||
],
|
||||
],
|
||||
package_data={
|
||||
'trytond.modules.stock_inventory_location': 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_stock_inventory_location',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Office/Business',
|
||||
],
|
||||
],
|
||||
license='GPL-3',
|
||||
install_requires=requires,
|
||||
zip_safe=False,
|
||||
@@ -67,4 +78,4 @@ setup(name='trytond_stock_inventory_location',
|
||||
""",
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[tryton]
|
||||
version=2.5.0
|
||||
depends:
|
||||
company
|
||||
ir
|
||||
product
|
||||
stock
|
||||
xml:
|
||||
inventory.xml
|
||||
Reference in New Issue
Block a user