forked from JGjorgji/chaperone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (60 loc) · 2.24 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
69
70
import os
import sys
import subprocess
from setuptools import setup, find_packages
if sys.version_info < (3,):
print("You must run setup.py with Python 3 only. Python 2 distributions are not supported.")
exit(1)
ourdir = os.path.dirname(__file__)
def read(fname):
return open(os.path.join(ourdir, fname)).read()
def get_version():
return subprocess.check_output([sys.executable, os.path.join("chaperone/cproc/version.py")]).decode().strip()
def which(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
requires_list = ['docopt>=0.6.2', 'ruamel.yaml', 'voluptuous>=0.8.7', 'aiocron>=0.3']
setup(
name = "chaperone",
version = get_version(),
description = 'Simple system init daemon for Docker-like environments',
long_description = read('README'),
packages = find_packages(),
#test_suite = "pyt_tests.tests.test_all",
entry_points={
'console_scripts': [
'chaperone = chaperone.exec.chaperone:main_entry',
'telchap = chaperone.exec.telchap:main_entry',
'envcp = chaperone.exec.envcp:main_entry',
'sdnotify = chaperone.exec.sdnotify:main_entry',
'sdnotify-exec = chaperone.exec.sdnotify_exec:main_entry',
],
},
license = "Apache Software License",
author = "Gary Wisniewski",
author_email = "[email protected]",
url = "http://github.com/garywiz/chaperone",
keywords = "docker init systemd syslog",
install_requires = requires_list,
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Topic :: System :: Logging",
"Topic :: System :: Boot :: Init",
]
)