1
|
|
|
#!/usr/bin/env python |
2
|
|
|
|
3
|
|
|
import os |
4
|
|
|
from setuptools import find_packages, setup |
5
|
|
|
|
6
|
|
|
ENCODING = 'utf-8' |
7
|
|
|
PACKAGE_NAME = 'alphavantage' |
8
|
|
|
|
9
|
|
|
local_directory = os.path.abspath(os.path.dirname(__file__)) |
10
|
|
|
version_path = os.path.join(local_directory, PACKAGE_NAME, '_version.py') |
11
|
|
|
|
12
|
|
|
version_ns = {} |
13
|
|
|
with open(version_path, 'r', encoding=ENCODING) as f: |
14
|
|
|
exec(f.read(), {}, version_ns) |
15
|
|
|
|
16
|
|
|
|
17
|
|
|
def get_requirements(requirement_file: str): |
18
|
|
|
requirements = list( |
19
|
|
|
open(requirement_file, 'r', |
20
|
|
|
encoding=ENCODING).read().strip().split('\r\n')) |
21
|
|
|
return requirements |
22
|
|
|
|
23
|
|
|
|
24
|
|
|
def get_readme(readme_file: str): |
25
|
|
|
with open(readme_file, encoding='utf-8') as file: |
26
|
|
|
return file.read() |
27
|
|
|
|
28
|
|
|
|
29
|
|
|
setup(name=PACKAGE_NAME, |
30
|
|
|
packages=find_packages(exclude=('tests',)), |
31
|
|
|
package_data={'': ['*.txt', '*.json']}, |
32
|
|
|
include_package_data=True, |
33
|
|
|
version=version_ns['__version__'], |
34
|
|
|
license='MIT', |
35
|
|
|
description='Alphavantage API wrapper.', |
36
|
|
|
long_description=get_readme('README.md'), |
37
|
|
|
long_description_content_type='text/markdown', |
38
|
|
|
url='https://github.com/portfoliome/alphavantage', |
39
|
|
|
classifiers=[ |
40
|
|
|
'Development Status :: 3 - Alpha', |
41
|
|
|
'Intended Audience :: Financial and Insurance Industry', |
42
|
|
|
'Topic :: Office/Business :: Financial :: Investment', |
43
|
|
|
'Natural Language :: English', |
44
|
|
|
'Programming Language :: Python :: 3.6', |
45
|
|
|
], |
46
|
|
|
author='Philip Martin', |
47
|
|
|
author_email='[email protected]', |
48
|
|
|
install_requires=get_requirements('requirements.txt'), |
49
|
|
|
extras_require={ |
50
|
|
|
'test': get_requirements('requirements-test.txt') |
51
|
|
|
}, |
52
|
|
|
zip_safe=False) |
53
|
|
|
|