当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 1 Fork 67

yutiansut / hf_ctp_proxy
暂停

forked from 海风 / pyctp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.py 2.06 KB
一键复制 编辑 原始数据 按行查看 历史
海风 提交于 2019-05-08 09:34 . 更新:支持linux x64
from setuptools import setup
import os
from os import path as os_path
import shutil
this_directory = os_path.abspath(os_path.dirname(__file__))
# 读取文件内容
def read_file(filename):
with open(os_path.join(this_directory, filename), encoding='utf-8') as f:
desc = f.read()
return desc
# 获取依赖
def read_requirements(filename):
return [line.strip() for line in read_file(filename).splitlines()
if not line.startswith('#')]
# 删除无用文件
for bit in [32,64]:
path = f'./py_ctp/lib{bit}'
for f in os.listdir(path):
if os.path.isdir(f):
continue
if os.path.splitext(f)[1] not in ['.dll', '.so']:
os.remove(f'./py_ctp/lib{bit}/{f}')
long_description = read_file('setup.md')
long_description_content_type = "text/markdown", # 指定包文档格式为markdown
# 生成requirements.txt pipreqs --encoding=utf8 py_ctp
setup(
name='py_ctp', # 包名
python_requires='>=3.4.0', # python环境
version='2.2.0', # 包的版本
description="Python CTP futures api", # 包简介,显示在PyPI上
long_description=long_description, # 读取的Readme文档内容
long_description_content_type=long_description_content_type, # 指定包文档格式为markdown
author="HaiFeng", # 作者相关信息
author_email='haifengat@vip.qq.com',
url='https://github.com/haifengat/hf_ctp_py_proxy',
# 指定包信息,还可以用find_packages()函数
# packages=find_packages(),
packages=['py_ctp'],
install_requires=read_requirements('requirements.txt'), # 指定需要安装的依赖
include_package_data=True,
license="MIT License",
platforms="any",
data_files=['README.md'],
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)
Python
1
https://gitee.com/yutiansut/hf_ctp_py_proxy.git
git@gitee.com:yutiansut/hf_ctp_py_proxy.git
yutiansut
hf_ctp_py_proxy
hf_ctp_proxy
master

搜索帮助