-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
43 lines (37 loc) · 1.33 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
from setuptools import setup
import glob, re, os
## get documentation from README.md
with open("README.md", "r") as fh:
long_description = fh.read()
## get version from spec file
with open('omdclient.spec', 'r') as fh:
for line in fh:
m = re.search("^Version:\s+(.*)\s*$", line)
if m:
version=m.group(1)
break
## get list of files to install
pyfiles = glob.glob(os.path.join('*', '*.py'))
pyfiles = [pyfile[:-3] for pyfile in pyfiles]
scripts = glob.glob(os.path.join('usr/bin/*'))
man = glob.glob(os.path.join('man/man1/*'))
setup (
name = 'omdclient',
version = version,
description = 'omdclient check_mk + WATO/OMD interface',
long_description = long_description,
long_description_content_type = 'text/markdown',
author = 'Tim Skirvin',
author_email = '[email protected]',
url = 'https://github.com/tskirvin/omdclient/',
license = 'Perl Artistic',
maintainer = 'Tim Skirvin',
maintainer_email = '[email protected]',
package_dir = { 'omdclient': 'omdclient' },
data_files = [ ( 'share/man/man1', man ) ],
scripts = scripts,
py_modules = pyfiles,
keywords = ['check_mk', 'omd', 'nagios', 'api', 'wato'],
install_requires = ['bs4>=4.0.0'],
)
# add classifiers, platforms