-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·62 lines (54 loc) · 1.96 KB
/
setup.py
File metadata and controls
executable file
·62 lines (54 loc) · 1.96 KB
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
#!/usr/bin/env python
"""Package setup."""
import codecs
import os
from typing import List
from setuptools import find_packages, setup
PROJECT = "axonius_api_client"
SHELL_CMD = "axonshell"
HERE = os.path.abspath(os.path.dirname(__file__))
PATH_VERSION = os.path.join(HERE, PROJECT, "version.py")
PATH_README = os.path.join(HERE, "README.md")
PATH_REQ = os.path.join(HERE, "requirements.txt")
def read(path: str, clean: bool = True) -> List[str]:
"""Read a file."""
with codecs.open(path, "r", "utf-8") as fh:
contents = fh.readlines()
if clean:
contents = [x for x in contents if not x.startswith("#") and x.strip()]
return contents
ABOUT = {}
CONTENTS = "\n".join(read(path=PATH_VERSION))
exec(CONTENTS, ABOUT)
README = "\n".join(read(path=PATH_README, clean=False))
INSTALL_REQUIRES = [x.strip() for x in read(path=PATH_REQ)]
setup(
name=ABOUT["__title__"],
version=ABOUT["__version__"],
description=ABOUT["__description__"],
long_description=README,
long_description_content_type="text/markdown",
author=ABOUT["__author__"],
author_email=ABOUT["__author_email__"],
url=ABOUT["__url__"],
packages=find_packages(),
package_data={"": ["LICENSE"]},
include_package_data=True,
python_requires=">=3.5",
install_requires=INSTALL_REQUIRES,
keywords=["Axonius", "API Library"],
tests_require=["pytest", "pytest-cov", "flaky", "coverage"],
license=ABOUT["__license__"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
entry_points={"console_scripts": [f"{SHELL_CMD}={PROJECT}.cli:cli"]},
)