/
setup.py
37 lines (34 loc) · 900 Bytes
/
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
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
from setuptools import setup, Command
import os, sys, re
class RunTestsCommand(Command):
description = "Test command to run testr in virtualenv"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
rc_sig = os.system('./run_tests.sh -V')
if rc_sig >> 8:
os._exit(rc_sig>>8)
with open('test.log') as f:
if not re.search('\nOK', ''.join(f.readlines())):
os._exit(1)
setup(
name='vnc_api',
version='0.1dev',
packages=['vnc_api',
'vnc_api.gen',
'vnc_api.common',
],
long_description="VNC API Library Package",
install_requires=[
'requests>=1.1.0'
],
cmdclass={
'run_tests': RunTestsCommand,
},
)