-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
50 lines (42 loc) · 1.43 KB
/
setup.py
File metadata and controls
50 lines (42 loc) · 1.43 KB
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
import codecs
import os
import re
from setuptools import setup
def read(*parts):
path = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(path, encoding='utf-8') as fobj:
return fobj.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
install_requires = [
'libvirt-python >= 5.6.0',
'prometheus-client >= 0.7.1',
'ConfigArgParse>=0.14.0'
]
setup(
name="libvirt_exporter",
version=find_version("libvirt_exporter", "__init__.py"),
description="Prometheus exporter for libvirt",
long_description=read('README.md'),
long_description_content_type="text/markdown",
url="https://github.com/patrickjahns/libvirt-prometheus-exporter",
author="Patrick Jahns",
author_email="github@patrickjahns.de",
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
'Environment :: Console',
"Programming Language :: Python",
"Programming Language :: Python :: 3",
],
packages=["libvirt_exporter"],
include_package_data=True,
install_requires=install_requires,
python_requires='>=3.7',
entry_points={"console_scripts": ["libvirt_exporter=libvirt_exporter.cli:main"]},
)