-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
44 lines (41 loc) · 1.4 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
import sys,os,site,shutil,subprocess,shlex
from setuptools import setup,Extension
try:
os.chdir(os.path.split(__file__)[0])
sys.path.append(os.getcwd())
except Exception:pass
sys.path.extend(site.getsitepackages()+[site.getusersitepackages()])
import sider_ai_api
if "sdist" in sys.argv[1:]:
if not os.path.isfile("README.rst"):
if shutil.which("pandoc"):
cmd="pandoc -t rst -o README.rst README.md"
print("Running pandoc:",cmd,"...")
result=subprocess.run(shlex.split(cmd))
print("Return code:",result.returncode)
else:
print("Requires the pandoc command to generate README.rst",
file=sys.stderr)
sys.exit(1)
long_desc=open("README.rst",encoding="utf-8").read()
else:
long_desc=""
setup(
name='sider-ai-api',
version=sider_ai_api.__version__,
description=sider_ai_api.__doc__.splitlines()[0],
long_description=long_desc,
author="qfcy",
author_email="3076711200@qq.com",
url="https://github.com/qfcy/sider-ai-api",
py_modules=['sider_ai_api'],
keywords=["sider.ai","chatgpt","gemini","claude","llama","o1",
"deepseek","深度求索"
],
classifiers=[
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Internet :: WWW/HTTP",
],
install_requires=["requests","brotli"],
)