-
Notifications
You must be signed in to change notification settings - Fork 103
/
setup.py
70 lines (53 loc) · 1.85 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
#!/usr/bin/env python
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
import os
import subprocess
package = 'quick2wire'
def contents_of(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return 'Quick2Wire API'
def devices():
return os.environ.get('devices','').split()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_suite = True
self.test_args = [package,
'--duration=5',
'-m',
("").join(d + " or " for d in devices()) + "not loopback"]
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(name='quick2wire-api',
version="0.0.0.2",
description='Quick2Wire API for Physical Computing',
long_description=contents_of('README.txt'),
author='Quick2Wire Ltd.',
author_email='[email protected]',
url='http://quick2wire.com',
license="LGPL or MIT",
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Lesser General Public License (LGPL)',
'License :: OSI Approved :: MIT',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Natural Language :: English',
'Topic :: Software Development',
],
platforms=['Linux'],
provides=[package],
packages=[package, package+'.parts'],
scripts=[],
tests_require=['pytest==2.3.4', 'factcheck==1.1.0.0'],
cmdclass = {'test': PyTest}
)