-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
40 lines (35 loc) · 1.16 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
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('ecf-puppetdb-tools.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/sbin/*'))
man = glob.glob(os.path.join('man/man1/*'))
setup (
author_email = 'tskirvin@fnal.gov',
author = 'Tim Skirvin',
data_files = [ ( 'share/man/man1', man ) ],
description = 'puppetdb tools and shared libraries',
keywords = ['puppetdb', 'puppet'],
license = 'Perl Artistic',
long_description_content_type = 'text/markdown',
long_description = long_description,
maintainer_email = 'tskirvin@fnal.gov',
maintainer = 'Tim Skirvin',
name = 'puppetdb-tools',
package_dir = { 'puppetdb': 'puppetdb' },
py_modules = pyfiles,
scripts = scripts,
url = 'http://github.com/tskirvin/puppetdb-tools',
version = version,
)