offlate/setup.py

setup.py

1
from setuptools import setup, find_packages
2
import distutils
3
import os
4
5
class LocalesCommand(distutils.cmd.Command):
6
    description='compile locale files'
7
    def run(self):
8
        command = ["make" "update-langs"]
9
        subprocess.check_call(command)
10
11
class FontsCommand(distutils.cmd.Command):
12
    description='generate font files'
13
    def run(self):
14
        command = ["make" "fonts"]
15
        subprocess.check_call(command)
16
17
version_file = open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'offlate', 'data', 'VERSION'))
18
version = version_file.read().strip()
19
20
setup (
21
    name="offlate",
22
    version=version,
23
    packages=find_packages(exclude=['.guix-profile*']),
24
    python_requires = '>=3',
25
    install_requires=['polib', 'ruamel.yaml', 'python-dateutil', 'PyQt5', 'pygit2',
26
        'python-gitlab', 'translate-toolkit', 'translation-finder',
27
        'android-stringslib', 'watchdog', 'PyGithub', 'lxml', 'pyenchant'],
28
    entry_points={
29
        'gui_scripts': [
30
            'offlate=offlate.ui.main:main',
31
        ]
32
    },
33
34
    package_data={'offlate': ['data/data.json', 'locales/*.qm', 'locales/*.ts',
35
        'ui/data/*.png', 'ui/data/*.ttf', 'data/VERSION']},
36
    cmdclass={
37
        'locales': LocalesCommand,
38
        'fonts': FontsCommand,
39
    },
40
41
    author="Julien Lepiller",
42
    author_email="julien@lepiller.eu",
43
    description="Offline translation interface for online translation tools.",
44
    long_description="""Offlate is a graphical interface designed for translators
45
of free and open source software.  Software projects in the free software community
46
use a wide range of online platforms (or no platform at all) to manage their
47
translations.  Offlate is able to connect to many different platforms, copy the
48
translations locally, and let you work on them on your computer, offline and in
49
a unified interface.""",
50
    license="GPLv3+",
51
    keywords="translation",
52
    url="https://framagit.org/tyreunom/offlate",
53
    classifiers=[
54
        # How mature is this project? Common values are
55
        #   3 - Alpha
56
        #   4 - Beta
57
        #   5 - Production/Stable
58
        'Development Status :: 3 - Alpha',
59
60
        # Indicate who your project is intended for
61
        'Intended Audience :: End Users/Desktop',
62
        'Topic :: Software Development :: Localization',
63
64
        # Pick your license as you wish (should match "license" above)
65
        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
66
67
        # Specify the Python versions you support here. In particular, ensure
68
        # that you indicate whether you support Python 2, Python 3 or both.
69
        'Programming Language :: Python :: 3',
70
    ],
71
    project_urls={
72
        "Bug Tracker": "https://framagit.org/tyreunom/offlate/issues",
73
        "Source Code": "https://framagit.org/tyreunom/offlate",
74
        #"Documentation": "https://docs.example.com/HelloWorld/",
75
    },
76
)
77