-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
93 lines (80 loc) · 2.4 KB
/
setup.py
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
# coding=utf-8
import os
from setuptools import find_packages, setup
requirements = [
'certifi',
'chardet',
'click',
'idna',
'metar',
'mpmath',
'natsort',
'requests',
'urllib3',
'elib',
'ujson',
'pathvalidate',
'python-dateutil',
'dataclasses',
'xmltodict',
]
test_requirements = [
'pip',
'pytest-vcr',
'epab',
'datadiff',
'pytz',
]
CLASSIFIERS = filter(None, map(str.strip,
"""
Development Status :: 3 - Alpha
Topic :: Utilities
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Environment :: Win32 (MS Windows)
Natural Language :: English
Operating System :: Microsoft :: Windows
Operating System :: Microsoft :: Windows :: Windows 7
Operating System :: Microsoft :: Windows :: Windows 8
Operating System :: Microsoft :: Windows :: Windows 8.1
Operating System :: Microsoft :: Windows :: Windows 10
Programming Language :: Cython
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: Implementation
Programming Language :: Python :: Implementation :: CPython
Topic :: Games/Entertainment
Topic :: Utilities
""".splitlines()))
def read_local_files(*file_paths: str) -> str:
"""
Reads one or more text files and returns them joined together.
A title is automatically created based on the file name.
:param file_paths: list of files to aggregate
"""
def _read_single_file(file_path):
with open(file_path) as f:
filename = os.path.splitext(file_path)[0]
title = f'{filename}\n{"=" * len(filename)}'
return '\n\n'.join((title, f.read()))
return '\n' + '\n\n'.join(map(_read_single_file, file_paths))
setup(
name='EMIZ',
author='132nd-etcher',
zip_safe=False,
author_email='emiz@daribouca.net',
platforms=['win32'],
url=r'https://github.com/132nd-etcher/EMIZ',
download_url=r'https://github.com/132nd-etcher/EMIZ/releases',
description='Set of tools for the DCS mission builder',
license='GPLv3',
long_description=read_local_files('README.rst', 'CHANGELOG.rst'),
packages=find_packages(),
include_package_data=True,
install_requires=requirements,
tests_require=test_requirements,
python_requires='>=3.6',
use_scm_version=True,
setup_requires=['setuptools_scm'],
classifiers=CLASSIFIERS,
)