-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
38 lines (31 loc) · 899 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
38
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
f = open(os.path.join(os.path.dirname(__file__), 'version.txt'))
version = f.read().strip()
f.close()
class SetupTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
try:
import pytest
import mockredis # noqa
except ImportError:
return
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name="cotask",
version=version,
description="task scheduler based on tornado",
author="qianwenpin",
author_email="pyloque@gmail.com",
license="MIT",
packages=['cotask'],
keywords=['tornado task scheduler'],
cmdclass={'test': SetupTest})