diff --git a/setup.py b/setup.py index fc2140fa..6298d61c 100644 --- a/setup.py +++ b/setup.py @@ -1,17 +1,29 @@ # encoding: UTF-8 +import os from setuptools import setup + import vnpy long_desc = """ """ +def getSubpackages(name): + """获取该模块下所有的子模块名称""" + splist = [] + + for dirpath, _dirnames, _filenames in os.walk(name): + if os.path.isfile(os.path.join(dirpath, '__init__.py')): + splist.append(".".join(dirpath.split(os.sep))) + + return splist + setup( name='vnpy', version=vnpy.__version__, - description='A utility for crawling historical and Real-time Quotes data of China stocks', + description='A framework for dveloping quantitative trading strategy', long_description = long_desc, author=vnpy.__author__, author_email='vn.py@foxmail.com', @@ -19,8 +31,10 @@ setup( url='http://www.vnpy.org', keywords='Python quantitative trading framework', classifiers=['Development Status :: 4 - Beta', - 'Programming Language :: Python :: 2.7' - 'License :: OSI Approved :: MIT License'], - packages=['vnpy','vnpy.api', 'vnpy.event', 'vnpy.rpc', 'vnpy.trader'], - package_data={'': ['*.json']}, + 'Programming Language :: Python :: 2.7', + 'License :: OSI Approved :: MIT License'], + packages=getSubpackages('vnpy'), + package_data={'': ['*.json', '*.md', + '*.dll', '*.lib', '*.so', '*.pyd', + '*.dat', '*.ini', '*.pfx', '*.scc', '*.crt', '*.key']}, ) \ No newline at end of file diff --git a/vnpy/__init__.py b/vnpy/__init__.py index 294d8889..80c6c22b 100644 --- a/vnpy/__init__.py +++ b/vnpy/__init__.py @@ -1,4 +1,4 @@ # encoding: UTF-8 -__version__ = 'v1.6.2 dev' +__version__ = '1.6.2' __author__ = u'用Python的交易员' \ No newline at end of file diff --git a/vnpy/trader/gateway/windGateway/windGateway.py b/vnpy/trader/gateway/windGateway/windGateway.py index 30c5d4bd..faae8a97 100644 --- a/vnpy/trader/gateway/windGateway/windGateway.py +++ b/vnpy/trader/gateway/windGateway/windGateway.py @@ -6,6 +6,8 @@ Wind Python API的gateway接入 from copy import copy +w = None + try: from WindPy import w except ImportError: