-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
57 lines (54 loc) · 1.79 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
import os
import subprocess
from setuptools import setup
# Prefer to use the version from the Debian package. Fall back to the version
# from git. This way the .git directory does not have to be included in the
# Debian source package.
if os.path.exists('debian/changelog'):
for line in subprocess.check_output(['dpkg-parsechangelog']).decode().split('\n'):
tokens = line.split()
if tokens[0] == 'Version:':
version = tokens[1]
break
else:
build_no = os.environ.get('BUILD_NUMBER', '0')
git_ref = subprocess.check_output(['git', 'rev-parse', '--verify', '--short', 'HEAD']).decode().rstrip()
version = '0.dev{}+g{}'.format(build_no, git_ref)
setup(
name = 'temper-exporter',
version = version,
description = 'Prometheus exporter for PCSensor TEMPer sensor devices',
url = 'https://github.com/yrro/temper-exporter',
author = 'Sam Morris',
author_email = '[email protected]',
license = 'MIT',
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Environment :: No Input/Output (Daemon)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Topic :: System :: Monitoring',
],
keywords = 'prometheus monitoring temperature sensor temper',
packages = ['temper_exporter'],
install_requires = [
'prometheus_client',
'pyudev',
'setuptools',
],
setup_requires=[
'pytest-runner',
],
tests_require = [
'pytest',
'pytest-mock',
],
entry_points = {
'console_scripts': [
'temper-exporter = temper_exporter:main',
],
},
)