generated from wayfair-incubator/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
58 lines (48 loc) · 1.69 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import ast
import inspect
import os
import re
import setuptools
from setuptools import setup
from os.path import expanduser
__location__ = os.path.join(
os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe()))
)
_version_re = re.compile(r"__version__\s+=\s+(.*)")
with open("exporter/__init__.py", "rb") as f:
_match = _version_re.search(f.read().decode("utf-8"))
if _match is None:
raise SystemExit("No version found")
version = str(ast.literal_eval(_match.group(1)))
def get_requirements(path):
content = open(os.path.join(__location__, path)).read()
return [req for req in content.split("\\n") if req != ""]
def setup_package():
setup(
name="kdave",
version=version,
url="https://github.com/wayfair-incubator/kdave",
author="Ahmed ElBakry",
author_email="aelbakry@wayfair.com",
description="Kubernetes deprecated API versions exporter CLI.",
long_description=open("docs/cli.rst").read(),
long_description_content_type="text/markdown",
packages=setuptools.find_packages(
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]
),
entry_points={
"console_scripts": ["kdave = exporter.manage:cli",]
},
install_requires=get_requirements("requirements.txt"),
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
)
if __name__ == "__main__":
setup_package()