forked from pythonlessons/FinRock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (39 loc) · 1.51 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
import os
from setuptools import setup, find_packages
DIR = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(DIR, 'README.md')) as fh:
long_description = fh.read()
with open(os.path.join(DIR, 'requirements.txt')) as fh:
requirements = fh.read().splitlines()
def get_version(initpath: str) -> str:
""" Get from the init of the source code the version string
Params:
initpath (str): path to the init file of the python package relative to the setup file
Returns:
str: The version string in the form 0.0.1
"""
path = os.path.join(os.path.dirname(__file__), initpath)
with open(path, "r") as handle:
for line in handle.read().splitlines():
if line.startswith("__version__"):
return line.split("=")[1].strip().strip("\"'")
else:
raise RuntimeError("Unable to find version string.")
setup(
name = 'finrock',
version = get_version("finrock/__init__.py"),
long_description = long_description,
long_description_content_type = 'text/markdown',
url='https://pylessons.com/',
author='PyLessons',
author_email='[email protected]',
install_requires=requirements,
python_requires='>=3',
packages = find_packages(exclude=['*.pyc']),
include_package_data=True,
project_urls={
'Source': 'https://github.com/pythonlessons/FinRock/',
'Tracker': 'https://github.com/pythonlessons/FinRock/issues',
},
description="Reinformcement Learning for Financial Trading",
)