-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
66 lines (53 loc) · 1.9 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
import os
from setuptools import find_packages, setup
def fetch_requirements(path):
with open(path, 'r') as fd:
return [r.strip() for r in fd.readlines()]
def fetch_readme():
with open('README.md', encoding='utf-8') as f:
return f.read()
def get_version():
with open('version.txt') as f:
return f.read().strip()
def get_project_files():
# get current file dir directory
# the templates files are located in current_file_path/templates
current_file_path = os.path.dirname(os.path.abspath(__file__))
project_file_dir = os.path.join(current_file_path, 'colossalai_platform/cli/commands/project/project_template')
# get all the files in project_file_dir
project_files = []
for file_name in os.listdir(project_file_dir):
project_files.append(os.path.join(project_file_dir, file_name))
return project_files
setup(
name='colossalai-platform',
version=get_version(),
packages=find_packages(exclude=(
'build',
'docker',
'tests',
'docs',
'examples',
'*.egg-info',
)),
description='ColossalAI Platform CLI for ease',
long_description=fetch_readme(),
long_description_content_type='text/markdown',
license='Apache Software License 2.0',
url='https://github.com/hpcaitech/ColossalAI-Platform-CLI',
project_urls={
'Github': 'https://github.com/hpcaitech/ColossalAI-Platform-CLI',
},
package_data={'': get_project_files()},
include_package_data=True,
install_requires=fetch_requirements('requirements.txt'),
python_requires='>=3.6',
entry_points='''
[console_scripts]
cap=colossalai_platform.cli:cli
''',
classifiers=[
'Programming Language :: Python :: 3', 'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Build Tools', "Topic :: System :: Distributed Computing"
],
)