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