-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
54 lines (45 loc) · 1.36 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
"""Setup for vt_graph_api module."""
import re
import sys
import setuptools
with open("./vt_graph_api/version.py") as f:
version = (
re.search(r"__version__ = \'([0-9]{1,}.[0-9]{1,}.[0-9]{1,})\'",
f.read()).groups()[0])
# check python version >2.7.x and >=3.2.x
installable = True
if sys.version_info.major == 3:
if sys.version_info.minor < 2:
installable = False
else:
if sys.version_info.minor < 7:
installable = False
if not installable:
sys.exit("Sorry, this python version is not supported")
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = [
"requests",
"six"
]
if sys.version_info.major == 2:
# Support enums in python 2.
install_requires.append("enum34")
setuptools.setup(
name="vt_graph_api",
version=version,
author="VirusTotal",
author_email="[email protected]",
description="The official Python client library for VirusTotal Graph API",
license="Apache 2",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/virustotal/vt-graph-api",
packages=setuptools.find_packages(),
install_requires=install_requires,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)