forked from openshift/openshift-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
68 lines (56 loc) · 2.18 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
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/python
import os
from setuptools import setup, find_packages
def get_requirements(filename="requirements.txt"):
"""Extract requirements from a pip formatted requirements file."""
with open(filename, "r") as requirements_file:
return requirements_file.read().splitlines()
def get_long_description():
"""Returns README.md content."""
return open("README.md", "r").read()
def read(rel_path):
"""Returns the contents of the file at the specified relative path."""
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
"""Returns the semantic version for the openshift-client module."""
for line in read(rel_path).splitlines():
if line.startswith('__VERSION__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
setup(
name="openshift-client",
version=get_version('packages/openshift/__init__.py'),
author="Justin Pierce",
author_email="[email protected]",
maintainer="Brad Williams",
maintainer_email="[email protected]",
url="https://github.com/openshift/openshift-client-python",
description="OpenShift python client",
packages=find_packages(where='packages'),
package_dir={"": "packages"},
install_requires=get_requirements(),
keywords=["OpenShift"],
include_package_data=True,
data_files=[
("requirements.txt", ["requirements.txt"]),
],
long_description=get_long_description(),
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Utilities",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
],
)