1 Star 0 Fork 11

lm_vn/ShiPanE-Python-SDK

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
Gao Rui 提交于 2018-09-22 16:06 . Increment version to 1.5.0
# -*- coding: utf-8 -*-
import os
import re
import shutil
from codecs import open
from setuptools import setup, find_packages
from setuptools.command.install import install
class CustomInstallCommand(install):
def run(self):
install.run(self)
config_path = os.path.join(os.path.expanduser('~'), '.shipane_sdk', 'config')
ConfigInstantiator.instantiate(config_path)
class ConfigInstantiator:
@staticmethod
def instantiate(path):
for filename in os.listdir(path):
match = re.search("(.*)-template\\.(.*)", filename)
if match is None:
continue
concrete_filename = '{}.{}'.format(match.group(1), match.group(2))
template_file_path = os.path.join(path, filename)
concrete_file_path = os.path.join(path, concrete_filename)
if os.path.isfile(concrete_file_path):
continue
shutil.copyfile(template_file_path, concrete_file_path)
def main():
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='shipane_sdk',
version='1.5.0',
description=u'实盘易(ShiPanE)Python SDK,通达信自动化交易 API。',
long_description=long_description,
url='https://github.com/sinall/ShiPanE-Python-SDK',
author='sinall',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Topic :: Office/Business :: Financial :: Investment',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='ShiPanE SDK 通达信 TDX Automation',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
install_requires=['requests', 'six', 'apscheduler', 'lxml', 'cssselect', 'bs4', 'html5lib', 'pandas',
'rqopen-client', 'tushare', 'pyyaml'],
extras_require={
'dev': [],
'test': [],
},
package_data={
},
data_files=[(os.path.join(os.path.expanduser('~'), '.shipane_sdk', 'config'), [
'config/scheduler-template.ini',
'config/logging-template.ini',
])],
scripts=['scripts/shipane-scheduler.py'],
entry_points={
'console_scripts': [
'shipane-scheduler = shipane_sdk.scheduler:start',
],
},
cmdclass={
'install': CustomInstallCommand,
},
)
if __name__ == '__main__':
main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/lm_vn/ShiPanE-Python-SDK.git
[email protected]:lm_vn/ShiPanE-Python-SDK.git
lm_vn
ShiPanE-Python-SDK
ShiPanE-Python-SDK
master

搜索帮助