forked from kontron/python-ipmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
65 lines (60 loc) · 2.22 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
import subprocess
name = 'python-ipmi'
version_py = os.path.join(os.path.dirname(__file__), 'pyipmi', 'version.py')
try:
version = subprocess.Popen(
['git', 'describe', '--tags', '--always', '--dirty'],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT).communicate()[0].rstrip()
with open(version_py, 'w') as f:
f.write('# This file was autogenerated by setup.py\n')
f.write('__version__ = \'%s\'\n' % (version,))
except (OSError, subprocess.CalledProcessError, IOError) as e:
try:
with open(version_py, 'r') as f:
d = dict()
exec(f.read(), d)
version = d['__version__']
except IOError:
version = 'unknown'
version = version.decode('utf-8')
with open('README.rst') as f:
readme = f.read()
setup(name = name,
version = version,
description = 'Pure python IPMI library',
long_description = readme,
url='https://github.com/kontron/python-ipmi',
download_url = 'https://github.com/kontron/python-ipmi/tarball/' + version,
author = 'Michael Walle, Heiko Thiery',
author_email = '[email protected], [email protected]',
packages = find_packages(exclude="test"),
license = 'LGPLv2+',
platforms = ["any"],
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Python Modules',
],
entry_points = {
'console_scripts': [
'ipmitool.py = pyipmi.ipmitool:main',
]
},
test_suite = 'tests',
install_requires=[
'markdown',
'future',
],
)