|
1
|
|
|
#!/usr/bin/env python |
|
2
|
|
|
|
|
3
|
|
|
import re |
|
4
|
|
|
from codecs import open |
|
5
|
|
|
|
|
6
|
|
|
try: |
|
7
|
|
|
from setuptools import setup |
|
8
|
|
|
except ImportError: |
|
9
|
|
|
from distutils.core import setup |
|
10
|
|
|
|
|
11
|
|
|
|
|
12
|
|
|
def get_version(): |
|
13
|
|
|
version = '' |
|
14
|
|
|
with open('grimreaper.py', 'r') as fd: |
|
15
|
|
|
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', |
|
16
|
|
|
fd.read(), re.MULTILINE).group(1) |
|
17
|
|
|
|
|
18
|
|
|
if not version: |
|
19
|
|
|
raise RuntimeError("Cannot find version's information") |
|
20
|
|
|
return version |
|
21
|
|
|
|
|
22
|
|
|
|
|
23
|
|
|
def get_long_description(): |
|
24
|
|
|
with open('README.rst', 'r', 'utf-8') as f: |
|
25
|
|
|
readme = f.read() |
|
26
|
|
|
|
|
27
|
|
|
with open('CHANGES.rst', 'r', 'utf-8') as f: |
|
28
|
|
|
changes = f.read() |
|
29
|
|
|
|
|
30
|
|
|
return readme + '\n\n' + changes |
|
31
|
|
|
|
|
32
|
|
|
setup( |
|
33
|
|
|
name='GrimReapersPie', |
|
34
|
|
|
version=get_version(), |
|
35
|
|
|
description='Python client to the GrimReaper process killer.', |
|
36
|
|
|
long_description=get_long_description(), |
|
37
|
|
|
author='Mateusz Pawlik', |
|
38
|
|
|
author_email='[email protected]', |
|
39
|
|
|
url='https://github.com/matee911/GrimReapersPie', |
|
40
|
|
|
py_modules=['grimreaper'], |
|
41
|
|
|
package_data={'': ['LICENSE', 'CHANGES.rst', 'README.rst']}, |
|
42
|
|
|
license='Apache 2.0', |
|
43
|
|
|
keywords='management', |
|
44
|
|
|
classifiers=( |
|
45
|
|
|
'Development Status :: 4 - Beta', |
|
46
|
|
|
'License :: OSI Approved :: Apache Software License', |
|
47
|
|
|
'Operating System :: MacOS :: MacOS X', |
|
48
|
|
|
'Operating System :: POSIX :: Linux', |
|
49
|
|
|
'Operating System :: Unix', |
|
50
|
|
|
'Intended Audience :: Developers', |
|
51
|
|
|
'Programming Language :: Python', |
|
52
|
|
|
'Programming Language :: Python :: 2.7', |
|
53
|
|
|
'Programming Language :: Python :: 3.4', |
|
54
|
|
|
'Topic :: Software Development', |
|
55
|
|
|
'Topic :: Software Development :: Libraries', |
|
56
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules', |
|
57
|
|
|
'Topic :: Utilities', |
|
58
|
|
|
), |
|
59
|
|
|
) |
|
60
|
|
|
|