-
Notifications
You must be signed in to change notification settings - Fork 19
/
setup.py
executable file
·46 lines (36 loc) · 1.3 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
import os
import requests
from dotenv import load_dotenv, find_dotenv
from setuptools import setup, find_packages
load_dotenv(find_dotenv('config.env'))
def get_version():
url = 'https://api.github.com/repos/suchak1/hyperdrive/releases/latest'
token = os.environ.get('GITHUB')
headers = {'Authorization': f'token {token}'}
response = requests.get(url, headers=headers if token else None)
data = response.json()
version = data['tag_name'].replace('v', '')
return version
def get_requirements():
with open('requirements.txt', 'r') as file:
return [line.strip() for line in file if line]
def get_readme():
with open("README.md", "r") as file:
return file.read()
setup(
name='hyperdrive',
version=get_version(),
description='An algorithmic trading platform',
long_description=get_readme(),
long_description_content_type="text/markdown",
url='https://github.com/suchak1/hyperdrive',
author='Krish Suchak',
author_email='suchak.krish@gmail.com',
packages=find_packages(),
python_requires='>=3.7',
install_requires=get_requirements(),
project_urls={
'Bug Reports': 'https://github.com/suchak1/hyperdrive/issues',
'Source': 'https://github.com/suchak1/hyperdrive'
}
)