2023-12-24 20:06:43 +08:00
|
|
|
"""Setup script for MetaGPT."""
|
2023-07-22 11:28:22 +08:00
|
|
|
import subprocess
|
2023-12-24 20:06:43 +08:00
|
|
|
from pathlib import Path
|
2023-06-30 17:10:48 +08:00
|
|
|
|
2023-07-22 11:28:22 +08:00
|
|
|
from setuptools import Command, find_packages, setup
|
2023-06-30 17:10:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class InstallMermaidCLI(Command):
|
|
|
|
|
"""A custom command to run `npm install -g @mermaid-js/mermaid-cli` via a subprocess."""
|
|
|
|
|
|
2023-07-24 00:22:38 +08:00
|
|
|
description = "install mermaid-cli"
|
2023-06-30 17:10:48 +08:00
|
|
|
user_options = []
|
|
|
|
|
|
|
|
|
|
def run(self):
|
2023-07-03 11:23:00 +08:00
|
|
|
try:
|
2023-07-24 00:22:38 +08:00
|
|
|
subprocess.check_call(["npm", "install", "-g", "@mermaid-js/mermaid-cli"])
|
2023-07-03 11:23:00 +08:00
|
|
|
except subprocess.CalledProcessError as e:
|
|
|
|
|
print(f"Error occurred: {e.output}")
|
2023-06-30 17:10:48 +08:00
|
|
|
|
|
|
|
|
|
2023-12-24 20:06:43 +08:00
|
|
|
here = Path(__file__).resolve().parent
|
|
|
|
|
long_description = (here / "README.md").read_text(encoding="utf-8")
|
|
|
|
|
requirements = (here / "requirements.txt").read_text(encoding="utf-8").splitlines()
|
2023-06-30 17:10:48 +08:00
|
|
|
|
2023-12-28 18:45:46 +08:00
|
|
|
|
|
|
|
|
extras_require = {
|
|
|
|
|
"playwright": ["playwright>=1.26", "beautifulsoup4"],
|
|
|
|
|
"selenium": ["selenium>4", "webdriver_manager", "beautifulsoup4"],
|
|
|
|
|
"search-google": ["google-api-python-client==2.94.0"],
|
2023-12-29 11:32:38 +08:00
|
|
|
"search-ddg": ["duckduckgo-search~=4.1.1"],
|
2023-12-28 18:45:46 +08:00
|
|
|
"ocr": ["paddlepaddle==2.4.2", "paddleocr>=2.0.1", "tabulate==0.9.0"],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extras_require["test"] = [
|
|
|
|
|
*set(i for j in extras_require.values() for i in j),
|
|
|
|
|
"pytest",
|
|
|
|
|
"pytest-asyncio",
|
|
|
|
|
"pytest-cov",
|
|
|
|
|
"pytest-mock",
|
|
|
|
|
"pytest-html",
|
2024-01-02 14:18:55 +08:00
|
|
|
"pytest-xdist",
|
2024-01-02 23:38:51 +08:00
|
|
|
"pytest-timeout",
|
2023-12-29 22:57:50 +08:00
|
|
|
"connexion[uvicorn]~=3.0.5",
|
|
|
|
|
"azure-cognitiveservices-speech~=1.31.0",
|
|
|
|
|
"aioboto3~=11.3.0",
|
2024-01-02 14:18:55 +08:00
|
|
|
"chromadb==0.4.14",
|
2023-12-29 22:57:50 +08:00
|
|
|
"gradio==3.0.0",
|
|
|
|
|
"grpcio-status==1.48.2",
|
2024-01-05 17:55:53 +08:00
|
|
|
"pylint==3.0.3",
|
2024-01-22 15:45:19 +08:00
|
|
|
"pybrowsers",
|
2023-12-28 18:45:46 +08:00
|
|
|
]
|
|
|
|
|
|
2023-12-28 22:47:03 +08:00
|
|
|
extras_require["pyppeteer"] = [
|
|
|
|
|
"pyppeteer>=1.0.2"
|
|
|
|
|
] # pyppeteer is unmaintained and there are conflicts with dependencies
|
2023-12-28 18:45:46 +08:00
|
|
|
extras_require["dev"] = (["pylint~=3.0.3", "black~=23.3.0", "isort~=5.12.0", "pre-commit~=3.6.0"],)
|
|
|
|
|
|
|
|
|
|
|
2023-06-30 17:10:48 +08:00
|
|
|
setup(
|
|
|
|
|
name="metagpt",
|
2024-01-17 11:31:09 +08:00
|
|
|
version="0.7.0",
|
2023-12-19 11:10:17 +08:00
|
|
|
description="The Multi-Agent Framework",
|
2023-06-30 17:10:48 +08:00
|
|
|
long_description=long_description,
|
|
|
|
|
long_description_content_type="text/markdown",
|
2023-11-10 14:56:31 +08:00
|
|
|
url="https://github.com/geekan/MetaGPT",
|
2023-06-30 17:10:48 +08:00
|
|
|
author="Alexander Wu",
|
2023-12-11 15:23:55 +08:00
|
|
|
author_email="alexanderwu@deepwisdom.ai",
|
2023-11-20 11:24:46 +08:00
|
|
|
license="MIT",
|
2023-12-19 11:10:17 +08:00
|
|
|
keywords="metagpt multi-agent multi-role programming gpt llm metaprogramming",
|
2023-11-10 14:56:31 +08:00
|
|
|
packages=find_packages(exclude=["contrib", "docs", "examples", "tests*"]),
|
2023-06-30 17:10:48 +08:00
|
|
|
python_requires=">=3.9",
|
|
|
|
|
install_requires=requirements,
|
2023-12-28 18:45:46 +08:00
|
|
|
extras_require=extras_require,
|
2023-06-30 17:10:48 +08:00
|
|
|
cmdclass={
|
2023-07-24 00:22:38 +08:00
|
|
|
"install_mermaid": InstallMermaidCLI,
|
2023-06-30 17:10:48 +08:00
|
|
|
},
|
2023-11-20 11:24:46 +08:00
|
|
|
entry_points={
|
2023-11-28 18:16:50 +08:00
|
|
|
"console_scripts": [
|
2024-02-01 11:24:31 +08:00
|
|
|
"metagpt=metagpt.software_company:app",
|
2023-11-20 11:24:46 +08:00
|
|
|
],
|
|
|
|
|
},
|
2023-06-30 17:10:48 +08:00
|
|
|
)
|