forked from pynag/pynag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·62 lines (58 loc) · 1.73 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
#!/usr/bin/python
## setup.py ###
from distutils.core import setup, Command
from pynag import __version__
NAME = "pynag"
SHORT_DESC = "Python modules for Nagios plugins and configuration"
LONG_DESC = """
Python modules and utilities for pragmatically handling Nagios configuration
file maintenance, status information, log file parsing and plug-in development.
"""
class PynagTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
#def parse_command
def run(self):
import sys,subprocess
errno = subprocess.call([sys.executable, 'tests/build-test.py'])
raise SystemExit(errno)
if __name__ == "__main__":
manpath = "share/man/man1"
etcpath = "/etc/%s" % NAME
etcmodpath = "/etc/%s/modules" % NAME
initpath = "/etc/init.d/"
logpath = "/var/log/%s/" % NAME
varpath = "/var/lib/%s/" % NAME
rotpath = "/etc/logrotate.d"
setup(
name='%s' % NAME,
version = __version__,
author='Drew Stinnett',
description = SHORT_DESC,
long_description = LONG_DESC,
author_email='[email protected]',
url='http://pynag.org/',
license='GPLv2',
scripts = [
'scripts/pynag'
],
packages = [
'pynag',
'pynag.Model',
'pynag.Model.EventHandlers',
'pynag.Plugins',
'pynag.Parsers',
'pynag.Control',
'pynag.Utils',
'pynag.Control',
'pynag.Control.Command',
],
data_files = [(manpath, [
'docs/pynag.1.gz',
]),
],
cmdclass = {'test': PynagTest}, requires=['unittest2'],
)