forked from vex1023/vxTrader
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
82 lines (68 loc) · 2.04 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
70
71
72
73
74
75
76
77
78
79
80
81
82
# encoding = utf-8
from __future__ import print_function
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import vxTrader
here = os.path.abspath(os.path.dirname(__file__))
requirements = [
'six',
'requests',
'numpy',
'pandas',
'pytesseract',
'demjson',
'Pillow'
]
readme = None
long_description = ''
if os.path.exists('README.md'):
readme = 'README.md'
elif os.path.exists('README.rst'):
readme = 'README.rst'
if readme:
with open(readme, 'rb') as f:
long_description = f.read().decode('utf-8')
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 pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='vxTrader',
version=vxTrader.__version__,
url='https://github.com/vex1023/vxTrader/',
license='The MIT License (MIT)',
author='vex1023',
author_email='vex1023@qq.com',
install_requires=requirements,
cmdclass={'test': PyTest},
description='vxTrader: A Chinese WebAPI wrapper',
long_description=long_description,
packages=find_packages(),
include_package_data=True,
platforms='any',
test_suite='vxTrader.tests.test_vxTrader',
# classifiers=(
# 'Development Status :: 5 - Production/Stable',
# 'Intended Audience :: Developers',
# 'Natural Language :: Chinese',
# 'Programming Language :: Python',
# 'Programming Language :: Python :: 3',
# 'Programming Language :: Python :: 3.3',
# 'Programming Language :: Python :: 3.4',
# 'Programming Language :: Python :: 3.5'
# ),
extras_require={
'testing': ['pytest']
}
)