forked from linode/linode-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·59 lines (47 loc) · 1.46 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
#!/usr/bin/env python3
from io import open
from setuptools import setup
from os import path
import subprocess
here = path.abspath(path.dirname(__file__))
# get the long description from the README.rst
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
def get_baked_files():
"""
A helper to retrieve the baked files included with this package. This is
to assist with building from source, where baked files may not be present
on a fresh clone
"""
data_files = []
if path.isfile('linode-cli.sh'):
data_files.append(('/etc/bash_completion.d', ['linode-cli.sh']))
return data_files
def get_version():
"""
Uses the version file to calculate this package's version
"""
return subprocess.check_output(["./version"]).decode("utf-8").rstrip()
setup(
name="linode-cli",
version=get_version(),
description="CLI for the Linode API",
long_description=long_description,
author="Linode",
author_email='[email protected]',
url="https://developers.linode.com/api/v4",
packages=[
'linodecli',
'linodecli.plugins',
],
license="BSD 3-Clause License",
install_requires=["terminaltables","colorclass","requests","PyYAML","enum34"],
entry_points={
"console_scripts": [
"linode-cli = linodecli:main",
]
},
data_files=get_baked_files(),
python_requires=">=2.7",
include_package_data=True
)