forked from CoreDotToday/CoreDotFinance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (69 loc) · 2 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import re
import sys
from setuptools import find_packages, setup
# Using numpy 1.20.0 requires python >= 3.7
if sys.version_info[:2] < (3, 7):
raise ImportError("""
This version of coredotfinance no supports python versions less than 3.7.0.
""")
def find_version(fname):
"""Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
"""
version = ''
with open(fname, 'r') as fp:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
if m:
version = m.group(1)
break
if not version:
raise RuntimeError('Cannot find version information')
return version
__version__ = find_version('coredotfinance/__init__.py')
def read(fname):
with open(fname) as fp:
content = fp.read()
return content
REQUIREMENTS = [
'requests>=2; python_version >= "3"',
'requests>=2; python_version < "3"',
]
INSTALL_REQUIRES = [
'pandas >= 0.14',
'numpy >= 1.8',
'requests >= 2.7.0',
'beautifulsoup4 >= 4.9.3',
'plotly >= 4.14.3',
]
with open('README.md') as f:
LONG_DESCRIPTION = f.read()
KEYWORDS = [
'finance',
'stock',
'money',
'krx',
'bitcoin',
'cryptocurrency',
'index'
]
with open('package_data/column_dict.txt', 'r') as f:
column_dict_list = f.read().split()
with open('package_data/jsp_files.txt' ,'r') as f:
jsp_files_list = f.read().split()
setup(
name='coredotfinance',
version=__version__,
packages=find_packages(),
package_data = {'coredotfinance.krx.core': column_dict_list, 'coredotfinance.krx.core.jsp': jsp_files_list},
url='https://github.com/coredottoday/CoreDotFinance',
license='',
author='Core.Today',
author_email='help@core.today',
description='Financial data on web',
keywords=KEYWORDS,
long_description_content_type = 'text/markdown',
long_description=LONG_DESCRIPTION,
install_requires=INSTALL_REQUIRES,
)