forked from avocado-framework/avocado-vt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
91 lines (81 loc) · 3.48 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See LICENSE for more details.
#
# Copyright: Red Hat Inc. 2013-2014
# Author: Lucas Meneghel Rodrigues <[email protected]>
# pylint: disable=E0611
import os
import shutil
from distutils.command.clean import clean
from pathlib import Path
from setuptools import setup, find_packages
VERSION = open('VERSION', 'r').read().strip()
class Clean(clean):
"""Our custom command to get rid of scratch files after build."""
description = "Get rid of scratch, byte files and build stuff."
def run(self):
super().run()
cleaning_list = ["MANIFEST", "BUILD", "BUILDROOT", "SPECS",
"RPMS", "SRPMS", "SOURCES", "PYPI_UPLOAD", "./build"]
cleaning_list += list(Path('.').rglob("*.pyc"))
cleaning_list += list(Path('.').rglob("__pycache__"))
for e in cleaning_list:
if not os.path.exists(e):
continue
if os.path.isfile(e):
os.remove(e)
if os.path.isdir(e):
shutil.rmtree(e)
if __name__ == "__main__":
setup(name='avocado-framework-plugin-vt',
version=VERSION,
description='Avocado Plugin for Virtualization Testing',
author='Avocado Developers',
author_email='[email protected]',
url='http://github.com/avocado-framework/avocado-vt',
packages=find_packages(exclude=('selftests*',)),
include_package_data=True,
entry_points={
'console_scripts': [
'avocado-runner-avocado-vt = avocado_vt.plugins.vt_runner:main',
],
'avocado.plugins.settings': [
'vt-settings = avocado_vt.plugins.vt_settings:VTSettings',
],
'avocado.plugins.cli': [
'vt-list = avocado_vt.plugins.vt_list:VTLister',
'vt = avocado_vt.plugins.vt:VTRun',
],
'avocado.plugins.cli.cmd': [
'vt-bootstrap = avocado_vt.plugins.vt_bootstrap:VTBootstrap',
'vt-list-guests = avocado_vt.plugins.vt_list_guests:VTListGuests',
'vt-list-archs = avocado_vt.plugins.vt_list_archs:VTListArchs',
],
'avocado.plugins.result_events': [
'vt-joblock = avocado_vt.plugins.vt_joblock:VTJobLock',
],
'avocado.plugins.init': [
'vt-init = avocado_vt.plugins.vt_init:VtInit',
],
'avocado.plugins.resolver': [
'avocado-vt = avocado_vt.plugins.vt_resolver:VTResolver'
],
'avocado.plugins.discoverer': [
'avocado-vt = avocado_vt.plugins.vt_resolver:VTDiscoverer'
],
'avocado.plugins.runnable.runner': [
'avocado-vt = avocado_vt.plugins.vt_runner:VTTestRunner',
],
},
install_requires=["netifaces", "six", "aexpect",
"avocado-framework>=82.1"],
cmdclass={'clean': Clean},
)