-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsetup.py
More file actions
72 lines (58 loc) · 1.94 KB
/
setup.py
File metadata and controls
72 lines (58 loc) · 1.94 KB
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
67
68
69
70
71
72
# -*- coding: utf-8 -*-
import os
import setuptools
package_root = os.path.abspath(os.path.dirname(__file__))
name = "dashscope"
description = "dashscope client sdk library"
def get_version():
version_file = os.path.join(package_root, name, "version.py")
with open(version_file, "r", encoding="utf-8") as f:
exec(compile(f.read(), version_file, "exec"))
return locals()["__version__"]
def get_dependencies(fname="requirements.txt"):
with open(
fname,
"r",
encoding="utf-8",
) as f: # pylint: disable=unspecified-encoding
dependencies = f.readlines()
return dependencies
url = "https://dashscope.aliyun.com/"
def readme():
with open(os.path.join(package_root, "README.md"), encoding="utf-8") as f:
content = f.read()
return content
setuptools.setup(
name=name,
version=get_version(),
description=description,
long_description=readme(),
long_description_content_type="text/markdown",
author="Alibaba Cloud",
author_email="dashscope@alibabacloud.com",
license="Apache 2.0",
url=url,
packages=setuptools.find_packages(
exclude=("tests"),
), # pylint: disable=superfluous-parens
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
platforms="Posix; MacOS X; Windows",
python_requires=">=3.8.0",
install_requires=get_dependencies(),
include_package_data=True,
extras_require={
"tokenizer": ["tiktoken"],
},
zip_safe=False,
entry_points={"console_scripts": ["dashscope = dashscope.cli:main"]},
)