-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
52 lines (47 loc) · 1.9 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
#!/usr/bin/python
#
# Copyright (C) 2012 Intel Corporation
#
# 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 the
# GNU General Public License for more details.
#
# Authors:
# Yuanyuan,Zou <[email protected]>
from setuptools import setup, find_packages
import os
from stat import ST_MODE, S_ISDIR
from distutils.command.install_data import install_data
class post_install_cmd(install_data):
def run (self):
install_data.run(self)
if os.name == 'posix':
for path in ['/opt/testkit/lite','/opt/testkit/lite/commodule/']:
try:
mode = os.stat(path)[ST_MODE]
mode |= 066
os.chmod(path, mode)
except OSError as err:
pass
setup(
name = "testkit-lite",
description = "Test runner for test execution",
url = "https://github.com/testkit/testkit-lite",
author = "Bruce Dai",
author_email = "[email protected]",
version = "3.1.18",
include_package_data = True,
data_files = [('/opt/testkit/lite', ['VERSION', 'doc/testkit-lite_user_guide.pdf', 'doc/testkit-lite_tutorial.pdf', 'doc/test_definition_schema.pdf']),
('/opt/testkit/lite/commodule/', ['CONFIG']),
('/opt/testkit/lite', ['resource/mh.html']),
('/etc/dbus-1/system.d/', ['dbus/com.intel.testkit.conf'])],
scripts = ('testkit-lite', 'dbus/testkit-lite-dbus'),
packages = find_packages(),
cmdclass = {'install_data': post_install_cmd},
)