hikyuu2/sub_setup.py

141 lines
4.0 KiB
C++
Raw Normal View History

2019-07-27 16:17:28 +08:00
#!/usr/bin/env python
#-*- coding:utf-8 -*-
2020-08-02 18:48:29 +08:00
import platform
2019-07-27 16:17:28 +08:00
from setuptools import setup, find_packages
hku_version = ''
2020-01-14 23:47:24 +08:00
with open('xmake.lua', 'r', encoding='utf-8') as f:
2019-07-27 16:17:28 +08:00
for line in f:
if len(line) > 15 and line[:11] == 'set_version':
pre_pos = line.find('"') + 1
end_pos = line.find('"', pre_pos)
2020-08-02 18:48:29 +08:00
hku_version = line[pre_pos:end_pos]
2019-07-27 16:17:28 +08:00
break
2020-08-02 18:48:29 +08:00
2019-07-27 16:17:28 +08:00
if not hku_version:
print("无法在 xmake.lua 中找到 set_version 语句,获取版本号失败!")
exit(0)
print('current hikyuu version:', hku_version)
2020-08-02 18:48:29 +08:00
py_version = platform.python_version_tuple()
py_version = int(py_version[0]) * 10 + int(py_version[1])
2019-11-30 23:26:39 +08:00
hku_name = "hikyuu"
2019-07-27 16:17:28 +08:00
#hku_version = "1.0.9"
hku_author = "fasiondog"
hku_author_email = "fasiondog@sina.com"
hku_license = "MIT"
2021-02-13 00:07:29 +08:00
hku_keywords = ["quant", "trade", "System Trading", "backtester", "量化",
"程序化交易", "量化交易", "系统交易"]
2019-07-27 16:17:28 +08:00
hku_platforms = "Independant"
hku_url = "http://hikyuu.org/"
hku_description = "Hikyuu Quant Framework for System Trading Analysis and backtester"
with open("README.rst", encoding='utf-8') as f:
hku_long_description = f.read()
hku_data_files = []
2020-08-02 18:48:29 +08:00
packages = [
'hikyuu',
'hikyuu/config',
'hikyuu/config/block',
'hikyuu/cpp',
'hikyuu/data',
'hikyuu/data/mysql_upgrade',
'hikyuu/data/sqlite_upgrade',
2020-12-16 00:10:47 +08:00
'hikyuu/data/sqlite_mem_sql',
2020-08-02 18:48:29 +08:00
'hikyuu/data_driver',
'hikyuu/examples',
2020-12-15 00:13:37 +08:00
'hikyuu/flat',
2020-11-29 19:01:18 +08:00
'hikyuu/fetcher',
2020-12-06 00:27:02 +08:00
'hikyuu/fetcher/proxy',
2020-11-29 19:01:18 +08:00
'hikyuu/fetcher/stock',
2020-08-02 18:48:29 +08:00
'hikyuu/gui',
'hikyuu/gui/data',
'hikyuu/indicator',
'hikyuu/draw',
'hikyuu/draw/drawplot',
#'hikyuu/test',
'hikyuu/tools',
'hikyuu/trade_manage',
'hikyuu/trade_sys',
'hikyuu/util',
]
2019-07-27 16:17:28 +08:00
setup(
2020-08-02 18:48:29 +08:00
name=hku_name,
version=hku_version,
description=hku_description,
long_description=hku_long_description,
author=hku_author,
author_email=hku_author_email,
license=hku_license,
keywords=hku_keywords,
platforms=hku_platforms,
url=hku_url,
packages=packages, #find_packages(),
zip_safe=False,
include_package_data=True,
package_data={
'': [
'*.rst', '*.pyd', '*.ini', '*.sql', '*.properties', '*.xml',
2020-08-15 00:24:35 +08:00
'LICENSE.txt', '*.dll', '*.exe', '*.ico', '*.so', '*.dylib',
2020-08-02 18:48:29 +08:00
'libboost_serialization*', 'libboost_python{}*'.format(py_version)
2019-07-27 16:17:28 +08:00
],
2020-08-02 18:48:29 +08:00
},
data_files=hku_data_files,
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Office/Business :: Financial',
'Topic :: Office/Business :: Financial :: Investment',
'Topic :: Scientific/Engineering :: Mathematics',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
entry_points={
'gui_scripts': [
'HikyuuTDX=hikyuu.gui.HikyuuTDX:start',
],
'console_scripts': [
'importdata=hikyuu.gui.importdata:main',
]
},
install_requires=[
'matplotlib',
2020-08-02 18:48:29 +08:00
'pandas>=0.17.1',
#'tushare>=0.8.2',
'pytdx',
'PyQt5',
'tables',
2020-08-15 16:29:57 +08:00
'bokeh',
2020-08-16 18:32:16 +08:00
'gitpython',
2020-09-11 23:30:01 +08:00
'SQLAlchemy',
2020-09-26 18:16:33 +08:00
'mysql-connector-python',
2020-11-29 19:01:18 +08:00
'pyperclip',
2020-12-06 00:27:02 +08:00
'requests',
2020-12-15 00:13:37 +08:00
'qdarkstyle',
2020-12-16 00:10:47 +08:00
'flatbuffers',
'pynng'
2020-08-02 18:48:29 +08:00
],
2019-07-27 16:17:28 +08:00
)