Files
tryton/tryton/setup.py
T

145 lines
4.2 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
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
2021-12-11 17:58:45 +01:00
from setuptools import find_packages, setup
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
2022-12-24 13:45:10 +01:00
if minor_version % 2:
download_url = ''
else:
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
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',
2022-12-24 13:45:10 +01:00
author_email='foundation@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',
2022-12-24 13:45:10 +01:00
"Source Code": 'https://code.tryton.org/tryton',
2019-04-06 17:38:58 +02:00
},
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)',
2021-05-02 09:56:34 +02:00
'Natural Language :: Romanian',
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',
2022-10-29 09:38:11 +02:00
'Natural Language :: Ukrainian',
2011-04-26 18:39:09 +02:00
'Operating System :: OS Independent',
2019-04-07 19:50:05 +02:00
'Programming Language :: Python :: 3',
2020-03-19 19:17:33 +01:00
'Programming Language :: Python :: 3.8',
2020-12-19 17:08:47 +01:00
'Programming Language :: Python :: 3.9',
2021-12-18 16:34:37 +01:00
'Programming Language :: Python :: 3.10',
2023-01-27 11:02:47 +01:00
'Programming Language :: Python :: 3.11',
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',
2023-01-29 20:36:51 +01:00
python_requires='>=3.8',
2008-09-30 10:19:09 +02:00
install_requires=[
'pycairo',
"python-dateutil",
2021-11-28 13:47:44 +01:00
'PyGObject>=3.19',
2014-01-31 00:05:43 +01:00
],
extras_require={
'calendar': ['GooCalendar>=0.7'],
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
)