diff --git a/MANIFEST.in b/MANIFEST.in index 44a0685b39..e4632a141f 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 2e6a715c6d..1b63d8f330 100644 --- a/README +++ b/README @@ -2,7 +2,6 @@ trytond_party ============= The party module of the Tryton application platform. -See __tryton__.py Installing ---------- diff --git a/__tryton__.py b/__tryton__.py deleted file mode 100644 index 6316f75aeb..0000000000 --- a/__tryton__.py +++ /dev/null @@ -1,53 +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': 'Party', - 'name_bg_BG': 'Партньор', - 'name_ca_ES': 'Tercers', - 'name_de_DE': 'Parteien', - 'name_es_AR': 'Entidades', - 'name_es_CO': 'Terceros', - 'name_es_ES': 'Terceros', - 'name_fr_FR': 'Tiers', - 'name_nl_NL': 'Relaties', - 'name_ru_RU': 'Контрагенты', - 'version': '2.5.0', - 'author': 'B2CK', - 'email': 'info@b2ck.com', - 'website': 'http://www.tryton.org/', - 'description': 'Define parties, addresses and co.', - 'description_bg_BG': 'Задаване на партньори, адреси и тн.', - 'description_ca_ES': 'Defineix tercers, adreces, etc.', - 'description_de_DE': 'Ermöglicht die Erstellung von Parteien, Adressen, etc.', - 'description_es_AR': 'Define entidades, direcciones, etc.', - 'description_es_CO': 'Definición de terceros, direcciones, etc.', - 'description_es_ES': 'Define terceros, direcciones, etc.', - 'description_fr_FR': 'Définit des tiers, des adresses, etc.', - 'description_nl_NL': 'Definieert relaties, adressen en bedrijven.', - 'description_ru_RU': 'Определение контрагентов, адресов и тп.', - 'depends': [ - 'ir', - 'res', - 'country', - ], - 'xml': [ - 'party.xml', - 'category.xml', - 'address.xml', - 'contact_mechanism.xml', - 'configuration.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 648ecf82ab..6823c09215 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_party', 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 with parties and addresses', + 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.party': '.'}, packages=[ 'trytond.modules.party', 'trytond.modules.party.tests', - ], + ], package_data={ 'trytond.modules.party': info.get('xml', []) \ - + info.get('translation', []) \ - + ['*.odt', 'icons/*.svg'], - }, + + ['tryton.cfg', 'locale/*.po', '*.odt', 'icons/*.svg'], + }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', @@ -58,12 +68,12 @@ setup(name='trytond_party', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Office/Business', - ], + ], license='GPL-3', install_requires=requires, extras_require={ 'VAT': ['vatnumber'], - }, + }, zip_safe=False, entry_points=""" [trytond.modules] @@ -71,4 +81,4 @@ setup(name='trytond_party', """, test_suite='tests', test_loader='trytond.test_loader:Loader', -) + ) diff --git a/tryton.cfg b/tryton.cfg new file mode 100644 index 0000000000..6d99e87ce3 --- /dev/null +++ b/tryton.cfg @@ -0,0 +1,12 @@ +[tryton] +version=2.5.0 +depends: + country + ir + res +xml: + party.xml + category.xml + address.xml + contact_mechanism.xml + configuration.xml