forked from avocado-framework/avocado
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·76 lines (64 loc) · 2.41 KB
/
setup.py
File metadata and controls
executable file
·76 lines (64 loc) · 2.41 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
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
#!/bin/env python
# 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 <lmr@redhat.com>
import glob
import os
# pylint: disable=E0611
from distutils.core import setup
import avocado.version
def get_settings_dir():
settings_system_wide = os.path.join('/etc', 'avocado')
settings_local_install = os.path.join('etc', 'avocado')
if 'VIRTUAL_ENV' in os.environ:
return settings_local_install
else:
return settings_system_wide
def get_tests_dir():
settings_system_wide = os.path.join('/usr', 'share', 'avocado', 'tests')
settings_local_install = os.path.join('tests')
if 'VIRTUAL_ENV' in os.environ:
return settings_local_install
else:
return settings_system_wide
def get_docs_dir():
settings_system_wide = os.path.join('/usr', 'share', 'doc', 'avocado')
settings_local_install = ''
if 'VIRTUAL_ENV' in os.environ:
return settings_local_install
else:
return settings_system_wide
def get_data_files():
data_files = [(get_settings_dir(), ['etc/settings.ini'])]
data_files += [(get_tests_dir(), glob.glob('examples/tests/*.py'))]
for data_dir in glob.glob('examples/tests/*.data'):
fmt_str = '%s/*' % data_dir
for f in glob.glob(fmt_str):
data_files += [(os.path.join(get_tests_dir(), os.path.basename(data_dir)), [f])]
data_files.append((get_docs_dir(), ['man/avocado.rst']))
return data_files
setup(name='avocado',
version=avocado.version.VERSION,
description='Avocado Test Framework',
author='Lucas Meneghel Rodrigues',
author_email='lmr@redhat.com',
url='http://github.com/avocado-framework/avocado',
packages=['avocado',
'avocado.cli',
'avocado.core',
'avocado.external',
'avocado.linux',
'avocado.utils',
'avocado.plugins'],
data_files=get_data_files(),
scripts=['scripts/avocado'])