2008-02-19 16:56:47 +01:00
|
|
|
#!/usr/bin/env python
|
2014-12-02 12:54:01 +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 16:56:47 +01:00
|
|
|
|
2008-09-30 10:45:11 +02:00
|
|
|
from setuptools import setup, find_packages
|
2008-02-19 16:56:47 +01:00
|
|
|
import os
|
2015-03-19 21:25:20 +01:00
|
|
|
import re
|
2016-02-07 16:46:16 +01:00
|
|
|
import io
|
2015-03-15 15:52:03 +01:00
|
|
|
import platform
|
2008-02-19 16:56:47 +01:00
|
|
|
|
2012-04-01 23:08:15 +02:00
|
|
|
|
2011-02-08 19:37:17 +01:00
|
|
|
def read(fname):
|
2016-02-07 16:46:16 +01:00
|
|
|
return io.open(
|
|
|
|
|
os.path.join(os.path.dirname(__file__), fname),
|
|
|
|
|
'r', encoding='utf-8').read()
|
2011-02-08 19:37:17 +01:00
|
|
|
|
2015-03-19 21:25:20 +01:00
|
|
|
|
|
|
|
|
def get_version():
|
|
|
|
|
init = read(os.path.join('trytond', '__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:58:02 +01:00
|
|
|
major_version = int(major_version)
|
|
|
|
|
minor_version = int(minor_version)
|
2015-03-19 21:25:20 +01:00
|
|
|
name = 'trytond'
|
2014-03-08 12:58:02 +01:00
|
|
|
|
|
|
|
|
download_url = 'http://downloads.tryton.org/%s.%s/' % (
|
|
|
|
|
major_version, minor_version)
|
|
|
|
|
if minor_version % 2:
|
2015-03-19 21:25:20 +01:00
|
|
|
version = '%s.%s.dev0' % (major_version, minor_version)
|
2014-03-08 12:58:02 +01:00
|
|
|
download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % (
|
2015-03-19 21:25:20 +01:00
|
|
|
name, name, version)
|
2014-03-08 12:58:02 +01:00
|
|
|
|
2015-03-15 15:52:03 +01:00
|
|
|
if platform.python_implementation() == 'PyPy':
|
|
|
|
|
pg_require = ['psycopg2cffi >= 2.5']
|
|
|
|
|
else:
|
2016-03-10 22:27:21 +01:00
|
|
|
pg_require = ['psycopg2 >= 2.5']
|
2015-03-15 15:52:03 +01:00
|
|
|
|
2015-03-19 21:25:20 +01:00
|
|
|
setup(name=name,
|
|
|
|
|
version=version,
|
2008-02-19 16:56:47 +01:00
|
|
|
description='Tryton server',
|
2011-02-08 19:37:17 +01:00
|
|
|
long_description=read('README'),
|
2012-06-08 19:32:23 +02:00
|
|
|
author='Tryton',
|
2014-03-08 12:58:02 +01:00
|
|
|
author_email='issue_tracker@tryton.org',
|
2015-03-19 21:25:20 +01:00
|
|
|
url='http://www.tryton.org/',
|
2014-03-08 12:58:02 +01:00
|
|
|
download_url=download_url,
|
|
|
|
|
keywords='business application platform ERP',
|
2011-10-31 17:37:06 +01:00
|
|
|
packages=find_packages(exclude=['*.modules.*', 'modules.*', 'modules',
|
|
|
|
|
'*.proteus.*', 'proteus.*', 'proteus']),
|
2008-02-19 16:56:47 +01:00
|
|
|
package_data={
|
2011-09-29 17:22:22 +02:00
|
|
|
'trytond': ['ir/ui/icons/*.svg'],
|
2011-01-22 15:17:08 +01:00
|
|
|
'trytond.backend.mysql': ['init.sql'],
|
2009-02-04 15:29:28 +01:00
|
|
|
'trytond.backend.postgresql': ['init.sql'],
|
2009-10-20 18:38:42 +02:00
|
|
|
'trytond.backend.sqlite': ['init.sql'],
|
2012-09-26 19:38:20 +02:00
|
|
|
'trytond.ir': ['tryton.cfg', '*.xml', 'view/*.xml', 'locale/*.po'],
|
2008-02-19 16:56:47 +01:00
|
|
|
'trytond.ir.module': ['*.xml'],
|
2008-06-17 13:22:43 +02:00
|
|
|
'trytond.ir.ui': ['*.xml', '*.rng', '*.rnc'],
|
2012-09-26 19:38:20 +02:00
|
|
|
'trytond.res': ['tryton.cfg', '*.xml', 'view/*.xml', 'locale/*.po'],
|
2013-09-16 11:38:11 +02:00
|
|
|
'trytond.tests': ['tryton.cfg', '*.xml'],
|
2012-06-08 19:32:23 +02:00
|
|
|
},
|
2016-03-15 16:57:26 +01:00
|
|
|
scripts=['bin/trytond', 'bin/trytond-admin', 'bin/trytond-cron'],
|
2008-02-19 16:56:47 +01:00
|
|
|
classifiers=[
|
|
|
|
|
'Development Status :: 5 - Production/Stable',
|
|
|
|
|
'Environment :: No Input/Output (Daemon)',
|
2011-09-29 23:20:35 +02:00
|
|
|
'Framework :: Tryton',
|
2008-02-19 16:56:47 +01:00
|
|
|
'Intended Audience :: Developers',
|
2008-09-24 15:10:49 +02:00
|
|
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
2011-04-26 18:03:13 +02:00
|
|
|
'Natural Language :: Bulgarian',
|
2013-04-19 19:49:29 +02:00
|
|
|
'Natural Language :: Catalan',
|
2016-05-01 10:59:39 +02:00
|
|
|
'Natural Language :: Chinese (Simplified)',
|
2011-10-23 21:11:01 +02:00
|
|
|
'Natural Language :: Czech',
|
2011-04-26 18:03:13 +02:00
|
|
|
'Natural Language :: Dutch',
|
2008-10-15 00:39:59 +02:00
|
|
|
'Natural Language :: English',
|
|
|
|
|
'Natural Language :: French',
|
|
|
|
|
'Natural Language :: German',
|
2015-09-02 13:49:26 +02:00
|
|
|
'Natural Language :: Hungarian',
|
2015-07-09 15:41:53 +02:00
|
|
|
'Natural Language :: Italian',
|
2015-06-22 22:09:20 +02:00
|
|
|
'Natural Language :: Portuguese (Brazilian)',
|
2010-04-12 07:45:23 +02:00
|
|
|
'Natural Language :: Russian',
|
2013-09-26 06:59:08 +02:00
|
|
|
'Natural Language :: Slovenian',
|
2008-10-15 00:39:59 +02:00
|
|
|
'Natural Language :: Spanish',
|
2008-02-19 16:56:47 +01:00
|
|
|
'Operating System :: OS Independent',
|
2011-04-26 18:03:13 +02:00
|
|
|
'Programming Language :: Python :: 2.7',
|
2016-02-07 16:46:16 +01:00
|
|
|
'Programming Language :: Python :: 3.3',
|
|
|
|
|
'Programming Language :: Python :: 3.4',
|
|
|
|
|
'Programming Language :: Python :: 3.5',
|
2015-03-15 15:52:03 +01:00
|
|
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
|
|
|
'Programming Language :: Python :: Implementation :: PyPy',
|
2008-02-19 16:56:47 +01:00
|
|
|
'Topic :: Software Development :: Libraries :: Application Frameworks',
|
2012-06-08 19:32:23 +02:00
|
|
|
],
|
2014-03-08 12:58:02 +01:00
|
|
|
platforms='any',
|
2015-03-19 21:25:20 +01:00
|
|
|
license='GPL-3',
|
2008-09-30 10:45:11 +02:00
|
|
|
install_requires=[
|
2010-03-26 18:28:50 +01:00
|
|
|
'lxml >= 2.0',
|
2008-09-30 10:45:11 +02:00
|
|
|
'relatorio >= 0.2.0',
|
2009-09-02 22:51:38 +02:00
|
|
|
'Genshi',
|
2009-12-17 11:39:54 +01:00
|
|
|
'python-dateutil',
|
2011-10-04 13:03:06 +02:00
|
|
|
'polib',
|
2014-11-24 13:57:12 +01:00
|
|
|
'python-sql >= 0.4',
|
2016-03-15 16:57:26 +01:00
|
|
|
'werkzeug',
|
|
|
|
|
'wrapt',
|
2012-06-08 19:32:23 +02:00
|
|
|
],
|
2008-10-23 16:48:23 +02:00
|
|
|
extras_require={
|
2015-03-15 15:52:03 +01:00
|
|
|
'PostgreSQL': pg_require,
|
2010-02-25 16:43:04 +01:00
|
|
|
'MySQL': ['MySQL-python'],
|
2011-08-06 18:25:24 +02:00
|
|
|
'unoconv': ['unoconv'],
|
2008-10-23 16:48:23 +02:00
|
|
|
'graphviz': ['pydot'],
|
2011-10-14 09:56:05 +02:00
|
|
|
'simplejson': ['simplejson'],
|
2012-01-04 19:54:30 +01:00
|
|
|
'cdecimal': ['cdecimal'],
|
2012-12-05 13:25:18 +01:00
|
|
|
'Levenshtein': ['python-Levenshtein'],
|
2014-02-24 19:48:03 +01:00
|
|
|
'BCrypt': ['bcrypt'],
|
2012-06-08 19:32:23 +02:00
|
|
|
},
|
2009-01-08 13:24:02 +01:00
|
|
|
zip_safe=False,
|
2010-03-12 17:47:49 +01:00
|
|
|
test_suite='trytond.tests',
|
|
|
|
|
test_loader='trytond.test_loader:Loader',
|
2014-08-06 12:13:29 +02:00
|
|
|
tests_require=['mock'],
|
2016-02-07 16:46:16 +01:00
|
|
|
use_2to3=True,
|
2014-03-08 12:58:02 +01:00
|
|
|
)
|