|
4 | 4 | # license information.
|
5 | 5 | # --------------------------------------------------------------------------
|
6 | 6 | """Setup script for msticpy."""
|
7 |
| -import os |
8 | 7 | import re
|
9 | 8 | import setuptools
|
10 | 9 |
|
11 |
| - |
12 |
| -def install_requires_rtd(install_list: list) -> list: |
13 |
| - """Return modified install list if installing for ReadtheDocs.""" |
14 |
| - rtd_exceptions = [ |
15 |
| - "Kqlmagic", |
16 |
| - "azure-cli-core", |
17 |
| - "matplotlib", |
18 |
| - "statsmodels", |
19 |
| - "scipy", |
20 |
| - "splunk-sdk", |
21 |
| - "seaborn", |
22 |
| - ] |
23 |
| - return [ |
24 |
| - pkg |
25 |
| - for pkg in install_list |
26 |
| - if not any(excl_pkg for excl_pkg in rtd_exceptions if excl_pkg in pkg) |
27 |
| - ] |
28 |
| - |
29 |
| - |
30 |
| -with open("README.md", "r", encoding="utf-8") as fh: |
31 |
| - LONG_DESC = fh.read() |
32 |
| - |
33 |
| -# pylint: disable=locally-disabled, invalid-name |
34 | 10 | with open("msticpy/_version.py", "r", encoding="utf-8") as fd:
|
35 | 11 | v_match = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE)
|
36 | 12 | __version__ = v_match.group(1) if v_match else "no version"
|
37 |
| -# pylint: enable=locally-disabled, invalid-name |
38 | 13 |
|
39 | 14 | with open("requirements.txt", "r", encoding="utf-8") as fh:
|
40 | 15 | INSTALL_REQUIRES = fh.readlines()
|
@@ -88,64 +63,10 @@ def _combine_extras(extras: list) -> list:
|
88 | 63 | EXTRAS["test"] = sorted(_combine_extras(["all", "dev"]))
|
89 | 64 | EXTRAS["azsentinel"] = sorted(_combine_extras(["azure", "kql", "keyvault"]))
|
90 | 65 | EXTRAS["azuresentinel"] = sorted(_combine_extras(["azure", "kql", "keyvault"]))
|
| 66 | +EXTRAS["sentinel"] = sorted(_combine_extras(["azure", "kql", "keyvault"])) |
91 | 67 |
|
92 |
| -# If ReadTheDocs build, remove a couple of problematic packages |
93 |
| -# (we ask Sphinx to mock these in the import) |
94 |
| -if os.environ.get("MP_RTD_BUILD"): |
95 |
| - INSTALL_REQUIRES = install_requires_rtd(INSTALL_REQUIRES) |
96 | 68 |
|
97 |
| -setuptools.setup( |
98 |
| - name="msticpy", |
99 |
| - version=__version__, |
100 |
| - author="Ian Hellen", |
101 |
| - author_email="ianhelle@microsoft.com", |
102 |
| - description="MSTIC Security Tools", |
103 |
| - license="MIT License", |
104 |
| - long_description=LONG_DESC, |
105 |
| - long_description_content_type="text/markdown", |
106 |
| - url="https://github.com/microsoft/msticpy", |
107 |
| - project_urls={ |
108 |
| - "Documentation": "https://msticpy.readthedocs.io", |
109 |
| - "Code": "https://github.com/microsoft/msticpy", |
110 |
| - "Issue tracker": "https://github.com/microsoft/msticpy/issues", |
111 |
| - }, |
112 |
| - python_requires=">=3.6", |
113 |
| - packages=setuptools.find_packages(exclude=["tests", "tests.*", "*.tests.*"]), |
114 |
| - classifiers=[ |
115 |
| - "Programming Language :: Python", |
116 |
| - "Programming Language :: Python :: 3", |
117 |
| - "Programming Language :: Python :: 3 :: Only", |
118 |
| - "Programming Language :: Python :: 3.6", |
119 |
| - "Programming Language :: Python :: 3.7", |
120 |
| - "Programming Language :: Python :: 3.8", |
121 |
| - "Programming Language :: Python :: 3.9", |
122 |
| - "Programming Language :: Python :: 3.10", |
123 |
| - "License :: OSI Approved :: MIT License", |
124 |
| - "Operating System :: OS Independent", |
125 |
| - "Development Status :: 5 - Production/Stable", |
126 |
| - "Framework :: IPython", |
127 |
| - "Framework :: Jupyter", |
128 |
| - "Intended Audience :: Developers", |
129 |
| - "Intended Audience :: Information Technology", |
130 |
| - "Topic :: Security", |
131 |
| - "Topic :: Software Development :: Libraries :: Python Modules", |
132 |
| - ], |
133 |
| - install_requires=INSTALL_REQUIRES, |
134 |
| - extras_require=EXTRAS, |
135 |
| - keywords=[ |
136 |
| - "security", |
137 |
| - "azure", |
138 |
| - "sentinel", |
139 |
| - "mstic", |
140 |
| - "cybersec", |
141 |
| - "infosec", |
142 |
| - "cyber", |
143 |
| - "cybersecurity", |
144 |
| - "jupyter", |
145 |
| - "notebooks", |
146 |
| - "SOC", |
147 |
| - "hunting", |
148 |
| - ], |
149 |
| - zip_safe=False, |
150 |
| - include_package_data=True, |
151 |
| -) |
| 69 | +if __name__ == "__main__": |
| 70 | + setuptools.setup( |
| 71 | + install_requires=INSTALL_REQUIRES, extras_require=EXTRAS, version=__version__ |
| 72 | + ) |
0 commit comments