-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsetup.py
41 lines (33 loc) · 1.09 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
from setuptools import setup, find_packages
from platform import python_version_tuple
from coscmd import cos_global
def requirements():
with open('requirements.txt', 'r') as fileobj:
requirements = [line.strip() for line in fileobj]
version = python_version_tuple()
if version[0] == 2 and version[1] == 6:
requirements.append("argparse==1.4.0")
if version[0] == 3:
requirements.append("argparse==1.1")
return requirements
def long_description():
with open('README.rst', 'rb') as fileobj:
return fileobj.read().decode('utf8')
setup(
name='coscmd',
version=cos_global.Version,
url='https://www.qcloud.com/',
license='MIT',
author='lewzylu',
author_email='[email protected]',
description='simple command for cos',
long_description=long_description(),
packages=find_packages(),
python_requires='>=3.6',
install_requires=requirements(),
entry_points={
'console_scripts': [
'coscmd=coscmd.cos_cmd:_main',
],
}
)