-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
148 lines (142 loc) · 4.67 KB
/
setup.py
File metadata and controls
148 lines (142 loc) · 4.67 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Mobile MCP AI - 移动端自动化测试框架
支持Android和iOS,集成AI增强功能
"""
from setuptools import setup, find_packages
from pathlib import Path
# 读取 README
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text(encoding='utf-8')
# 读取 requirements
requirements = []
requirements_file = this_directory / "requirements.txt"
if requirements_file.exists():
with open(requirements_file, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
# 跳过空行和注释
if line and not line.startswith('#'):
requirements.append(line)
setup(
name="mobile-mcp-ai",
version="2.8.0", # 工具范式重构:按交互范式分组注入,精简 prompt
author="douzi",
author_email="1492994674@qq.com",
description="移动端自动化 MCP Server - 支持 Android/iOS,AI 功能可选(基础工具不需要 AI)",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/test111ddff-hash/mobile-mcp-ai",
project_urls={
"Documentation": "https://github.com/test111ddff-hash/mobile-mcp-ai",
"Source": "https://github.com/test111ddff-hash/mobile-mcp-ai",
"Tracker": "https://github.com/test111ddff-hash/mobile-mcp-ai/issues",
},
# 明确列出所有包,确保在 mobile_mcp 命名空间下
packages=[
'mobile_mcp',
'mobile_mcp.core',
'mobile_mcp.core.utils',
'mobile_mcp.mcp_tools',
'mobile_mcp.utils',
],
# 将 mobile_mcp 映射到当前目录
package_dir={'mobile_mcp': '.'},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries :: Python Modules",
],
python_requires=">=3.8",
install_requires=[
# 核心依赖(基础工具必需)
"uiautomator2>=2.16.0",
"adbutils>=1.2.0",
"Pillow>=10.0.0",
"mcp>=0.9.0",
"python-dotenv>=1.0.0", # 用于读取 .env 配置
"uvicorn[standard]>=0.24.0", # SSE 模式 HTTP 服务器
"starlette>=0.27.0", # SSE 模式路由
],
extras_require={
# AI 功能(可选)- 智能工具需要
'ai': [
'dashscope>=1.10.0', # 通义千问(推荐)
'openai>=1.0.0', # OpenAI
'anthropic>=0.3.0', # Claude
],
# 测试相关(可选)
'test': [
'pytest>=8.0.0',
'pytest-asyncio>=0.21.0',
'allure-pytest>=2.13.0',
],
# 开发工具(可选)
'dev': [
'pytest>=8.0.0',
'pytest-asyncio>=0.21.0',
'twine>=4.0.0',
'build>=0.10.0',
],
# iOS 支持(可选)- tidevice + facebook-wda 方案
'ios': [
'tidevice>=0.11.0',
'facebook-wda>=1.4.0',
],
# H5 支持(可选)
'h5': [
'Appium-Python-Client>=3.0.0',
'selenium>=4.0.0',
],
# Windows 自动化支持(可选)- mobile_open_new_chat 功能需要
'windows': [
'pyautogui>=0.9.0', # 模拟键盘操作
'pyperclip>=1.8.0', # 剪贴板操作
'pygetwindow>=0.0.9', # 窗口激活
],
# 完整安装(包含所有功能)
'all': [
'dashscope>=1.10.0',
'openai>=1.0.0',
'anthropic>=0.3.0',
'Appium-Python-Client>=3.0.0',
'selenium>=4.0.0',
'pytest>=8.0.0',
'pytest-asyncio>=0.21.0',
'allure-pytest>=2.13.0',
'pyautogui>=0.9.0',
'pyperclip>=1.8.0',
'pygetwindow>=0.0.9',
],
},
entry_points={
'console_scripts': [
'mobile-mcp=mobile_mcp.mcp_tools.mcp_server:main',
],
},
keywords=[
"mobile",
"automation",
"testing",
"android",
"ios",
"mcp",
"ai",
"pytest",
"cursor",
],
include_package_data=True,
zip_safe=False,
# 包含模板图片到包内
package_data={
'mobile_mcp.core': ['templates/close_buttons/*.png'],
},
)