-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
86 lines (62 loc) · 2.07 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
from setuptools import setup, find_packages
# * Standard Library Imports -->
import os
# * Third Party Imports -->
# region[Constants]
GIDCONFIG_AUTHOR = ['Giddius']
GIDCONFIG_SHORT_DESCRIPTION = 'WiP'
GIDCONFIG_LONG_DESCRIPTION_FILE = 'README.md'
GIDCONFIG_VERSION = "0.1.0"
GIDCONFIG_LICENSE = 'MIT'
GIDCONFIG_ENTRY_POINTS = {}
GIDCONFIG_URL = ''
GIDCONFIG_REQUIREMENTS_FILE = 'requirements.txt'
# endregion[Constants]
def get_dependencies():
# sourcery skip: inline-immediately-returned-variable, list-comprehension
_out = []
if os.path.isfile(GIDCONFIG_REQUIREMENTS_FILE) is True:
with open(GIDCONFIG_REQUIREMENTS_FILE, 'r', errors='replace') as fileobject:
_temp_list = fileobject.read().splitlines()
for line in _temp_list:
if line != '' and line.startswith('#') is False:
_out.append(line)
return _out
def get_long_description_type():
_type_dict = {
'md': 'text/markdown',
'rst': 'text/x-rst',
'txt': 'text/plain'
}
_ext = GIDCONFIG_LONG_DESCRIPTION_FILE.split('.')[-1]
return _type_dict.get(_ext, 'text/plain')
def get_version():
return GIDCONFIG_VERSION
def get_short_description():
return GIDCONFIG_SHORT_DESCRIPTION
def get_long_description():
with open(GIDCONFIG_LONG_DESCRIPTION_FILE, 'r', errors='replace') as fileobject:
_out = fileobject.read()
return _out
def get_url():
return GIDCONFIG_URL
def get_author():
return GIDCONFIG_AUTHOR
def get_license():
return GIDCONFIG_LICENSE
def get_entry_points():
return GIDCONFIG_ENTRY_POINTS
setup(name='gidconfig',
version=get_version(),
description=get_short_description(),
long_description=get_long_description(),
long_description_content_type=get_long_description_type(),
url=get_url(),
author=get_author(),
license=get_license(),
packages=find_packages(),
install_requires=get_dependencies(),
include_package_data=True,
entry_points=get_entry_points(),
options={"bdist_wheel": {"universal": True}}
)