-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathsetup.py
55 lines (44 loc) · 1.75 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/11/20 8:15
# @Author : HaiFeng
# @Email : 24918700@qq.com
from setuptools import setup
import os
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('#')]
long_description = read_file('readme.md')
long_description_content_type = 'text/markdown' # 指定包文档格式为markdown
# talib无需加入 os.system('pipreqs . --encoding=utf8 --force') # 生成 requirements.txt
setup(
name='hfpy', # 包名
python_requires='>=3.6.0', # python环境
version='0.2.2', # 包的版本
description="Hai Feng Future Trading Platform with SE", # 包简介,显示在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_at_py',
# 指定包信息,还可以用find_packages()函数
# packages=find_packages(),
packages=['hfpy'],
install_requires=read_requirements('requirements.txt'), # 指定需要安装的依赖
include_package_data=True,
license="MIT License",
platforms="any",
classifiers=[
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)