-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
executable file
·63 lines (51 loc) · 1.36 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
#!/usr/bin/env python
import sys
from itertools import chain
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
PACKAGE_NAME = 'measure'
VERSION = '0.5.1'
requires = {
'global': [
'pystatsd',
'boto3',
],
'tests': [
'mock',
'pytest',
'django',
],
'develop': [
'flake8',
'autopep8',
]
}
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
requires['all'] = list(set(chain.from_iterable(requires.values()))),
setup(
author='adam hitchcock',
author_email='[email protected]',
cmdclass={'test': PyTest},
url='http://github.com/disqus/measure',
extras_require=requires,
name=PACKAGE_NAME,
packages=find_packages(),
requires=requires['global'],
test_suite='nose.collector',
tests_require=requires['all'],
version=VERSION,
zip_safe=False,
)