-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
100 lines (90 loc) · 3.28 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
94
95
96
97
98
99
100
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This code is part of the TrinityX software suite
# Copyright (C) 2023 ClusterVision Solutions b.v.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>
"""
Setup file, will build the pip package for the project.
"""
__author__ = 'Sumit Sharma'
__copyright__ = 'Copyright 2022, Trinity[OOD]'
__license__ = 'GPL'
__version__ = '2.0'
__maintainer__ = 'Sumit Sharma'
__email__ = '[email protected]'
__status__ = 'Development'
from time import time
import pathlib
from setuptools import setup, find_packages
PRE = "{Personal-Access-Token-Name}:{Personal-Access-Token}"
DIR = pathlib.Path(__file__).parent.resolve()
try: # for pip >= 10
from pip._internal.req import parse_requirements
install_requirements = list(parse_requirements(f'{DIR}/requirements.txt', session='hack'))
requirements = [str(ir.requirement) for ir in install_requirements]
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
install_requirements = parse_requirements('requirements.txt', session='hack')
requirements = [str(ir.req) for ir in install_requirements]
def new_version():
"""
This Method will create a New version and update the Version file.
"""
time_now = int(time())
version = f'2.0.{time_now}'
with open(f'{DIR}/VERSION.txt', 'w', encoding='utf-8') as ver:
ver.write(version)
return version
setup(
name = "trinityx-ood",
version = new_version(),
description = "Trinity Open On Demand Application to support GUI via Luna 2 Daemon.",
long_description = "This project will serve the GUI via Luna2 Daemon.\
This project is a part of Trinity Open On Demand.",
author = "Sumit Sharma",
author_email = "[email protected]",
maintainer = "Sumit Sharma",
maintainer_email = "[email protected]",
url = "https://gitlab.taurusgroup.one/clustervision/trinityx-ood.git",
download_url = f"https://{PRE}@gitlab.taurusgroup.one/api/v4/projects/30/packages/pypi/simple",
packages = find_packages(),
license = "MIT",
keywords = ["luna", "ood", "GUI", "Trinity", "ClusterVision", "Sumit", "Sumit Sharma"],
entry_points = {
'console_scripts': [
'trinity = bmcsetup.app:main'
]
},
install_requires = requirements,
dependency_links = [],
data_files = [],
zip_safe = False,
include_package_data = True,
classifiers = [
'Development Status :: Beta',
'Environment :: Web Interface',
'Intended Audience :: System Administrators',
'License :: MIT',
'Operating System :: RockyLinux :: CentOS :: RedHat',
'Programming Language :: Python',
'Topic :: Trinity :: Luna'
],
platforms = [
'RockyLinux',
'CentOS',
'RedHat'
]
)
# python setup.py sdist bdist_wheel