MetaGPT/setup.py

126 lines
3.8 KiB
Python
Raw Normal View History

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 = {
"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"],
2024-03-29 10:15:46 +08:00
"ocr": ["paddlepaddle==2.4.2", "paddleocr~=2.7.3", "tabulate==0.9.0"],
2024-03-22 10:28:11 +08:00
"rag": [
"llama-index-core==0.10.15",
"llama-index-embeddings-azure-openai==0.1.6",
"llama-index-embeddings-openai==0.1.5",
"llama-index-embeddings-gemini==0.1.6",
"llama-index-embeddings-ollama==0.1.2",
2024-03-22 10:28:11 +08:00
"llama-index-llms-azure-openai==0.1.4",
"llama-index-readers-file==0.1.4",
"llama-index-retrievers-bm25==0.1.3",
"llama-index-vector-stores-faiss==0.1.1",
2024-03-27 11:15:10 +08:00
"llama-index-vector-stores-elasticsearch==0.1.6",
"llama-index-vector-stores-chroma==0.1.6",
2024-04-16 11:28:19 +08:00
"llama-index-postprocessor-cohere-rerank==0.1.4",
"llama-index-postprocessor-colbert-rerank==0.1.1",
"llama-index-postprocessor-flag-embedding-reranker==0.1.2",
# "llama-index-vector-stores-milvus==0.1.23",
"docx2txt==0.8",
2024-03-22 10:28:11 +08:00
],
2023-12-28 18:45:46 +08:00
}
extras_require["test"] = [
*set(i for j in extras_require.values() for i in j),
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-mock",
"pytest-html",
"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",
2024-05-17 14:21:09 +08:00
"aioboto3~=12.4.0",
2023-12-29 22:57:50 +08:00
"gradio==3.0.0",
"grpcio-status==1.48.2",
"grpcio-tools==1.48.2",
"google-api-core==2.17.1",
"protobuf==3.19.6",
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"],)
extras_require["android_assistant"] = [
"pyshine==0.0.9",
"opencv-python==4.6.0.66",
"protobuf<3.20,>=3.9.2",
"modelscope",
"tensorflow==2.9.1; os_name == 'linux'",
"tensorflow==2.9.1; os_name == 'win32'",
"tensorflow-macos==2.9; os_name == 'darwin'",
"keras==2.9.0",
"torch",
"torchvision",
"transformers",
"opencv-python",
"matplotlib",
"pycocotools",
"SentencePiece",
"tf_slim",
"tf_keras",
"pyclipper",
"shapely",
"groundingdino-py",
"datasets==2.18.0",
"clip-openai",
]
2023-12-28 18:45:46 +08:00
2023-06-30 17:10:48 +08:00
setup(
name="metagpt",
2024-04-22 18:48:09 +08:00
version="0.8.1",
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",
author_email="alexanderwu@deepwisdom.ai",
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*"]),
2024-08-18 11:31:26 +08:00
python_requires=">=3.9, <3.12",
2023-06-30 17:10:48 +08:00
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
},
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",
],
},
2024-03-28 18:24:14 +08:00
include_package_data=True,
2023-06-30 17:10:48 +08:00
)