forked from xtream1101/logredactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
57 lines (53 loc) · 1.91 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
from setuptools import setup, find_packages
import os
try:
with open("README.md", "r") as f:
long_description = f.read()
except FileNotFoundError:
long_description = ""
branch = os.getenv('GITHUB_REF', 'master').split('/')[-1] # Default to 'master' if GITHUB_REF is not set
url = f"https://github.com/armurox/loggingredactor/tree/{branch}"
# Get version from environment variable
version = os.getenv('RELEASE_VERSION', '0.0.6') # Default to '0.0.6' if RELEASE_VERSION is not set
# Get development status
split_version = version.split('-')
if len(split_version) == 2:
release_mode = split_version[1][0].upper()
status = {
'P': '1 - Planning',
'R': '2 - Pre-Alpha',
'A': '3 - Alpha',
'B': '4 - Beta'
}.get(release_mode)
else:
status = '5 - Production/Stable'
setup(
name="loggingredactor",
packages=find_packages(),
version=version,
url=url,
description="Redact data in logs based on regex filters and keys",
long_description=long_description,
long_description_content_type="text/markdown",
author="Arman Jasuja",
author_email="[email protected]",
classifiers=[
f"Development Status :: {status}",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Topic :: Software Development :: Libraries",
],
python_requires='>=3.7',
)