-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
97 lines (87 loc) · 3.69 KB
/
setup.py
File metadata and controls
97 lines (87 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2018- Gettext-Helpers Contributors (see AUTHORS.txt)
#
# This file is part of Gettext-Helpers.
# <https://github.com/spyder-ide/gettext-helpers>
#
# Gettext-Helpers is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Gettext-Helpers is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gettext-Helpers. If not, see <https://www.gnu.org/licenses/>.
#
# See LICENSE.txt in the gettext-helpers repository root for the full text.
# Also, see NOTICE.txt in the same location for more detailed legal history:
# <https://github.com/spyder-ide/gettext-helpers/blob/master/NOTICE.txt>
# -----------------------------------------------------------------------------
"""
Gettext-Helpers
===============
Gettext-Helpers is originally based on a module and set of scripts from the
GUIdata project <https://github.com/PierreRaybaut/guidata> by Pierre Raybaut,
the original creator of Spyder, the Scientific Python Development Environment
<https://www.spyder-ide.org/>, and later adopted for use internally with
building the translations for that project by current Spyder maintainer
Carlos Cordoba and others, with additional improvements added during that time.
Finally, it was spun out into its own project for modularity and flexibility.
"""
# Standard library imports
import ast
import os
# Third party imports
from setuptools import find_packages, setup
# Constants
HERE = os.path.abspath(os.path.dirname(__file__))
DOCLINES = __doc__.split('\n')
def get_version(module='gettext_helpers'):
"""Get version."""
with open(os.path.join(HERE, module, '_version.py'), 'r') as f:
data = f.read()
lines = data.split('\n')
for line in lines:
if line.startswith('VERSION_INFO'):
version_tuple = ast.literal_eval(line.split('=')[-1].strip())
version = '.'.join(map(str, version_tuple))
break
return version
setup(
name='gettext-helpers',
version=get_version(),
keywords='gettext spyder i18n translation',
url='https://github.com/spyder-ide/gettext-helpers',
license='GNU General Public License Version 3 or later',
author='Spyder Development Team',
author_email="admin@spyder-ide.org",
description="Helper functions to manage gettext translations",
long_description="\n".join(DOCLINES[4:]),
packages=find_packages(),
include_package_data=True,
entry_points={
'console_scripts': [
'spyder-gettext = gettext_helpers.main:main',
'pygettext = gettext_helpers.vendor.pygettext:main',
'msgfmt = gettext_helpers.vendor.msgfmt:main',
],
},
install_requires=['polib', 'selenium'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Internationalization',
'Topic :: Software Development :: Localization',
'Topic :: Text Processing :: Linguistic',
'Topic :: Utilities']
)