-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
34 lines (29 loc) · 1.02 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
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import shutil
from setuptools import setup
from setuptools.command.install import install
from oshino_jmx.version import get_version
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
# PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
from scripts.download_agent import fetch_jar
fetch_jar()
if not os.path.exists("etc/"):
os.makedirs("etc")
shutil.copy("scripts/etc/jmxconfig.yml", "etc/jmxconfig.yml")
install.run(self)
setup(name="oshino_jmx",
version=get_version(),
description="Collect JMX metrics from JVM services",
author="Šarūnas Navickas",
author_email="zaibacu@gmail.com",
packages=["oshino_jmx"],
install_requires=["oshino", "oshino_statsd"],
test_suite="pytest",
tests_require=["pytest", "pytest-cov"],
setup_requires=["pytest-runner"],
cmdclass={"install": PostInstallCommand}
)