Simplify module information with python configuration
review363001
This commit is contained in:
1 parent
686ea6e4f9
commit
457bf32678
5 files changed
+30
-50
No files matched your search
@@ -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,20 +32,20 @@ requires.append('trytond >= %s.%s, < %s.%s' %
|
||||
|
||||
setup(name='trytond_account_be',
|
||||
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 Belgium chart of accounts',
|
||||
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.account_be': '.'},
|
||||
packages=[
|
||||
'trytond.modules.account_be',
|
||||
],
|
||||
],
|
||||
package_data={
|
||||
'trytond.modules.account_be': info.get('xml', []) \
|
||||
+ info.get('translation', []),
|
||||
},
|
||||
+ ['tryton.cfg'],
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -49,7 +60,7 @@ setup(name='trytond_account_be',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Office/Business',
|
||||
'Topic :: Office/Business :: Financial :: Accounting',
|
||||
],
|
||||
],
|
||||
license='GPL-3',
|
||||
install_requires=requires,
|
||||
zip_safe=False,
|
||||
@@ -57,4 +68,4 @@ setup(name='trytond_account_be',
|
||||
[trytond.modules]
|
||||
account_be = trytond.modules.account_be
|
||||
""",
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user