-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (53 loc) · 1.65 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
import os
import re
from setuptools import setup
# from packaging.version import parse, InvalidVersion
# def get_version() -> str:
# try:
# ref = os.environ.get('GITHUB_REF_NAME', '0.0.1')
# version = parse(ref)
# return version.public
# except InvalidVersion:
# return '0.0.1'
def get_version():
version = os.environ.get('GITHUB_REF_NAME', '0.0.1')
pattern = r'^(\d+)\.(\d+)\.(\d+)(?:-(\w+|\d+)\.(\w+|\d+))?$'
match = re.match(pattern, version)
if match:
return version
else:
return '0.0.1'
with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
long_description = f.read()
setup(
version=get_version(),
name='zipline-cli',
description='Python 3 CLI for Zipline',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/cssnr/zipline-cli',
author='Shane',
author_email='shane@sapps.me',
py_modules=['zipline'],
install_requires=['requests', 'python-decouple', 'python-dotenv'],
python_requires='>=3.8',
include_package_data=True,
zip_safe=False,
platforms='any',
project_urls={
# 'Documentation': 'https://zipline-cli.sapps.me/',
'Source': 'https://github.com/cssnr/zipline-cli',
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
],
entry_points={
'console_scripts': [
'zipline = zipline:main',
],
},
)