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', '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', 'translation-finder', 'android-stringslib', 'watchdog', |
27 | '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', 'ui/data/icon.png', 'data/VERSION']}, |
35 | cmdclass={ |
36 | 'locales': LocalesCommand, |
37 | 'fonts': FontsCommand, |
38 | }, |
39 | |
40 | author="Julien Lepiller", |
41 | author_email="julien@lepiller.eu", |
42 | description="Offline translation interface for online translation tools.", |
43 | long_description="""Offlate is a graphical interface designed for translators |
44 | of free and open source software. Software projects in the free software community |
45 | use a wide range of online platforms (or no platform at all) to manage their |
46 | translations. Offlate is able to connect to many different platforms, copy the |
47 | translations locally, and let you work on them on your computer, offline and in |
48 | a unified interface.""", |
49 | license="GPLv3+", |
50 | keywords="translation", |
51 | url="https://framagit.org/tyreunom/offlate", |
52 | classifiers=[ |
53 | # How mature is this project? Common values are |
54 | # 3 - Alpha |
55 | # 4 - Beta |
56 | # 5 - Production/Stable |
57 | 'Development Status :: 3 - Alpha', |
58 | |
59 | # Indicate who your project is intended for |
60 | 'Intended Audience :: End Users/Desktop', |
61 | 'Topic :: Software Development :: Localization', |
62 | |
63 | # Pick your license as you wish (should match "license" above) |
64 | 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', |
65 | |
66 | # Specify the Python versions you support here. In particular, ensure |
67 | # that you indicate whether you support Python 2, Python 3 or both. |
68 | 'Programming Language :: Python :: 3', |
69 | ], |
70 | project_urls={ |
71 | "Bug Tracker": "https://framagit.org/tyreunom/offlate/issues", |
72 | "Source Code": "https://framagit.org/tyreunom/offlate", |
73 | #"Documentation": "https://docs.example.com/HelloWorld/", |
74 | }, |
75 | ) |
76 |