MetaGPT/setup.py

62 lines
1.9 KiB
Python
Raw Normal View History

2023-06-30 17:10:48 +08:00
"""wutils: handy tools
"""
2023-07-22 11:28:22 +08:00
import subprocess
2023-06-30 17:10:48 +08:00
from codecs import open
from os import path
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
here = path.abspath(path.dirname(__file__))
2023-07-03 21:44:50 +08:00
with open(path.join(here, "README.md"), encoding="utf-8") as f:
2023-06-30 17:10:48 +08:00
long_description = f.read()
with open(path.join(here, "requirements.txt"), encoding="utf-8") as f:
requirements = [line.strip() for line in f if line]
setup(
name="metagpt",
2023-12-19 11:10:17 +08:00
version="0.5.1",
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*"]),
2023-06-30 17:10:48 +08:00
python_requires=">=3.9",
install_requires=requirements,
2023-07-24 00:22:38 +08:00
extras_require={
2023-07-25 01:31:58 +08:00
"playwright": ["playwright>=1.26", "beautifulsoup4"],
2023-08-08 23:02:15 +08:00
"selenium": ["selenium>4", "webdriver_manager", "beautifulsoup4"],
"search-google": ["google-api-python-client==2.94.0"],
"search-ddg": ["duckduckgo-search==3.8.5"],
2023-09-15 13:03:21 +08:00
"pyppeteer": ["pyppeteer>=1.0.2"],
"ocr": ["paddlepaddle==2.4.2", "paddleocr>=2.0.1", "tabulate==0.9.0"],
2023-07-24 00:22:38 +08:00
},
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": [
"metagpt=metagpt.startup:app",
],
},
2023-06-30 17:10:48 +08:00
)