Files
tryton/setup.py
T

113 lines
3.2 KiB
Python
Raw Normal View History

2008-02-19 17:55:24 +01:00
#!/usr/bin/env python
2014-12-03 16:04:19 +01:00
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
2008-02-19 17:55:24 +01:00
2008-09-30 10:19:09 +02:00
from setuptools import setup, find_packages
2008-02-19 17:55:24 +01:00
import os
2011-11-22 13:15:45 -05:00
import re
2008-06-13 14:19:51 +02:00
2012-04-03 20:04:58 +02:00
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
2008-06-13 14:19:51 +02:00
args = {}
2008-07-04 00:06:56 +02:00
try:
from babel.messages import frontend as babel
args['cmdclass'] = {
2014-12-03 16:04:19 +01:00
'compile_catalog': babel.compile_catalog,
'extract_messages': babel.extract_messages,
'init_catalog': babel.init_catalog,
'update_catalog': babel.update_catalog,
2008-07-04 00:06:56 +02:00
}
args['message_extractors'] = {
2014-12-03 16:04:19 +01:00
'tryton': [
('**.py', 'python', None),
2008-07-04 00:06:56 +02:00
],
}
except ImportError:
pass
2015-10-03 11:45:10 +02:00
package_data = {
'tryton': ['data/pixmaps/tryton/*.png',
'data/pixmaps/tryton/*.svg',
'data/locale/*/LC_MESSAGES/*.mo',
'data/locale/*/LC_MESSAGES/*.po',
]
2015-10-03 11:45:10 +02:00
}
data_files = []
2008-02-19 17:55:24 +01:00
2015-03-19 21:24:15 +01:00
def get_version():
init = read(os.path.join('tryton', '__init__.py'))
return re.search('__version__ = "([0-9.]*)"', init).group(1)
version = get_version()
major_version, minor_version, _ = version.split('.', 2)
2014-03-08 12:59:24 +01:00
major_version = int(major_version)
minor_version = int(minor_version)
2015-03-19 21:24:15 +01:00
name = 'tryton'
2014-03-08 12:59:24 +01:00
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
if minor_version % 2:
2015-03-19 21:24:15 +01:00
version = '%s.%s.dev0' % (major_version, minor_version)
2014-03-08 12:59:24 +01:00
download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % (
2015-03-19 21:24:15 +01:00
name, name, version)
2014-03-08 12:59:24 +01:00
2015-03-19 21:24:15 +01:00
dist = setup(name=name,
version=version,
2008-02-19 17:55:24 +01:00
description='Tryton client',
2011-02-15 16:10:11 +01:00
long_description=read('README'),
2012-11-14 23:52:15 +01:00
author='Tryton',
2014-03-08 12:59:24 +01:00
author_email='issue_tracker@tryton.org',
2015-03-19 21:24:15 +01:00
url='http://www.tryton.org/',
2014-03-08 12:59:24 +01:00
download_url=download_url,
keywords='business application ERP',
2008-09-30 10:19:09 +02:00
packages=find_packages(),
2015-10-03 11:45:10 +02:00
package_data=package_data,
data_files=data_files,
scripts=['bin/tryton'],
2008-02-19 17:55:24 +01:00
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: X11 Applications :: GTK',
2011-09-29 23:26:08 +02:00
'Framework :: Tryton',
2008-02-19 17:55:24 +01:00
'Intended Audience :: End Users/Desktop',
2008-11-17 14:48:11 +01:00
'License :: OSI Approved :: GNU General Public License (GPL)',
2011-04-26 18:39:09 +02:00
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
2016-05-01 11:00:11 +02:00
'Natural Language :: Chinese (Simplified)',
2011-10-24 01:09:10 +02:00
'Natural Language :: Czech',
2011-04-26 18:39:09 +02:00
'Natural Language :: Dutch',
2008-10-15 00:40:15 +02:00
'Natural Language :: English',
'Natural Language :: French',
'Natural Language :: German',
2015-09-02 14:06:08 +02:00
'Natural Language :: Hungarian',
2015-07-09 15:46:01 +02:00
'Natural Language :: Italian',
2016-11-25 23:50:52 +01:00
'Natural Language :: Polish',
2015-06-22 22:50:14 +02:00
'Natural Language :: Portuguese (Brazilian)',
2010-04-12 07:45:48 +02:00
'Natural Language :: Russian',
'Natural Language :: Slovenian',
2016-11-25 23:50:52 +01:00
'Natural Language :: Spanish',
'Natural Language :: Japanese',
2011-04-26 18:39:09 +02:00
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
2008-02-19 17:55:24 +01:00
'Topic :: Office/Business',
2013-10-04 21:15:10 +02:00
],
2014-03-08 12:59:24 +01:00
platforms='any',
2015-03-19 21:24:15 +01:00
license='GPL-3',
2008-09-30 10:19:09 +02:00
install_requires=[
2014-12-03 16:04:19 +01:00
# "pygtk >= 2.6",
"python-dateutil",
2015-09-25 17:55:01 +02:00
"chardet",
2014-01-31 00:05:43 +01:00
],
extras_require={
2012-01-04 19:55:24 +01:00
'cdecimal': ['cdecimal'],
2013-06-09 20:13:45 +02:00
'calendar': ['GooCalendar'],
2013-10-04 21:15:10 +02:00
},
2014-03-08 12:59:24 +01:00
zip_safe=False,
2008-06-13 14:19:51 +02:00
**args
2013-10-04 21:15:10 +02:00
)