Files
tryton/setup.py
T

150 lines
4.5 KiB
Python
Raw Normal View History

2018-06-26 19:08:57 +02:00
#!/usr/bin/env python3
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
2018-06-26 19:08:57 +02:00
import io
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):
2018-06-26 19:08:57 +02:00
return io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').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
class extract_messages(babel.extract_messages):
def initialize_options(self):
super().initialize_options()
self.omit_header = True
self.no_location = True
class update_catalog(babel.update_catalog):
def initialize_options(self):
super().initialize_options()
self.omit_header = True
self.ignore_obsolete = True
2008-07-04 00:06:56 +02:00
args['cmdclass'] = {
2014-12-03 16:04:19 +01:00
'compile_catalog': babel.compile_catalog,
'extract_messages': extract_messages,
2014-12-03 16:04:19 +01:00
'init_catalog': babel.init_catalog,
'update_catalog': 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:
2019-05-23 10:10:47 +02:00
pass
2008-07-04 00:06:56 +02:00
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)
2018-06-26 19:08:57 +02:00
2015-03-19 21:24:15 +01:00
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)
2019-11-25 21:55:22 +01:00
local_version = []
for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER', 'CI_JOB_ID']:
if os.environ.get(build):
local_version.append(os.environ[build])
if local_version:
version += '+' + '.'.join(local_version)
2014-03-08 12:59:24 +01:00
2015-03-19 21:24:15 +01:00
dist = setup(name=name,
version=version,
2019-04-06 17:38:58 +02:00
description='Tryton desktop client',
long_description=read('README.rst'),
2012-11-14 23:52:15 +01:00
author='Tryton',
2019-03-31 00:15:10 +01:00
author_email='bugs@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,
2019-04-06 17:38:58 +02:00
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": 'https://docs.tryton.org/',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://hg.tryton.org/tryton',
},
2014-03-08 12:59:24 +01:00
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',
2019-05-01 16:38:57 +02:00
'Natural Language :: Finnish',
2008-10-15 00:40:15 +02:00
'Natural Language :: French',
'Natural Language :: German',
2015-09-02 14:06:08 +02:00
'Natural Language :: Hungarian',
2019-11-01 23:35:00 +01:00
'Natural Language :: Indonesian',
2015-07-09 15:46:01 +02:00
'Natural Language :: Italian',
2018-04-14 17:22:32 +02:00
'Natural Language :: Persian',
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',
2019-05-01 16:18:50 +02:00
'Natural Language :: Turkish',
'Natural Language :: Japanese',
2011-04-26 18:39:09 +02:00
'Operating System :: OS Independent',
2019-04-07 19:50:05 +02:00
'Programming Language :: Python :: 3',
2018-06-26 19:08:57 +02:00
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
2018-07-28 16:44:11 +02:00
'Programming Language :: Python :: 3.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',
2019-04-07 19:50:05 +02:00
python_requires='>=3.5',
2008-09-30 10:19:09 +02:00
install_requires=[
'pycairo',
"python-dateutil",
2019-06-07 09:57:20 +02:00
'PyGObject',
2014-01-31 00:05:43 +01:00
],
extras_require={
'calendar': ['GooCalendar>=0.5'],
2013-10-04 21:15:10 +02:00
},
2014-03-08 12:59:24 +01:00
zip_safe=False,
2019-12-18 22:41:05 +01:00
test_suite='tryton.tests',
2008-06-13 14:19:51 +02:00
**args
2013-10-04 21:15:10 +02:00
)