mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 03:55:26 +00:00
🔧 更换项目的包管理工具为 poetry
This commit is contained in:
parent
3ddb71cd06
commit
320fadc5cb
32
README.md
32
README.md
@ -13,32 +13,28 @@
|
|||||||
|
|
||||||
项目仅供学习交流使用,严禁用于任何商业用途和非法行为
|
项目仅供学习交流使用,严禁用于任何商业用途和非法行为
|
||||||
|
|
||||||
## 需求
|
## 环境需求
|
||||||
|
|
||||||
### 环境需求
|
|
||||||
|
|
||||||
- Python 3.8+
|
- Python 3.8+
|
||||||
- MySQL
|
- MySQL
|
||||||
- Redis
|
- Redis
|
||||||
|
|
||||||
#### 环境需求需要的注意事项
|
## 使用方法
|
||||||
|
|
||||||
因为上游 `genshin.py` 的原因 本项目 python 最低版本为 3.8
|
### 1. 安装 `poetry`
|
||||||
|
```bash
|
||||||
|
pip install --upgrade poetry
|
||||||
|
```
|
||||||
|
|
||||||
### 模块需求
|
### 2. 安装依赖
|
||||||
|
```bash
|
||||||
|
poetry update
|
||||||
|
```
|
||||||
|
### 3. 运行
|
||||||
|
```bash
|
||||||
|
python ./main.py
|
||||||
|
```
|
||||||
|
|
||||||
#### 模块需求需要的注意事项
|
|
||||||
|
|
||||||
`python-telegram-bot` 需要预览版本 即 `20.0a4`
|
|
||||||
|
|
||||||
出现相关的 `telegram` 模块导入的 `ImportError` 错误需要你手动执行 `pip install python-telegram-bot==20.0a2`
|
|
||||||
|
|
||||||
请注意你的 python 是否安装 `aiohttp` ( `genshin.py` 的依赖)
|
|
||||||
|
|
||||||
如果 `aiohttp` 版本大于 `4.0.0a1`
|
|
||||||
会导致 `redis` 和 `aiohttp` 的依赖 `async-timeout` 版本冲突进而运行代码导致 `TypeError` 异常
|
|
||||||
|
|
||||||
解决上面版本冲突导致的错误需要你手动执行 `pip install aiohttp==3.8.1`
|
|
||||||
|
|
||||||
## 其他说明
|
## 其他说明
|
||||||
|
|
||||||
|
31
pyproject.toml
Normal file
31
pyproject.toml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "tgpaimonbot"
|
||||||
|
version = "0.3.0"
|
||||||
|
description = "Telegarm robot, query the official genshin information."
|
||||||
|
authors = ["洛水居室", "zhxy-CN", "Chuangbo Li", "kotoriのねこ", "omg-xtao", "艾迪", "Karako"]
|
||||||
|
license = "AGPL-3.0"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.8"
|
||||||
|
ujson = "^5.4.0"
|
||||||
|
genshin = { git = "https://github.com/thesadru/genshin.py" }
|
||||||
|
Jinja2 = "^3.1.2"
|
||||||
|
numpy = "^1.23.2"
|
||||||
|
python-telegram-bot = { version = "^20.0a4", extras = ["rate-limiter"] }
|
||||||
|
Pillow = "^9.2.0"
|
||||||
|
sqlmodel = "^0.0.8"
|
||||||
|
colorlog = "^6.7.0"
|
||||||
|
playwright = "^1.25.2"
|
||||||
|
fakeredis = "^1.9.0"
|
||||||
|
beautifulsoup4 = "^4.11.1"
|
||||||
|
asyncmy = "^0.2.5"
|
||||||
|
pyppeteer = "^1.0.2"
|
||||||
|
aiofiles = "^0.8.0"
|
||||||
|
python-dotenv = "^0.20.0"
|
||||||
|
PyMySQL = "^1.0.2"
|
||||||
|
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
@ -1,24 +0,0 @@
|
|||||||
redis>=4.3.3
|
|
||||||
ujson==5.4.0
|
|
||||||
git+https://github.com/thesadru/genshin.py
|
|
||||||
colorlog~=6.6.0
|
|
||||||
numpy~=1.22.3
|
|
||||||
httpx==0.23.0
|
|
||||||
asyncio>=3.4.3
|
|
||||||
jinja2>=3.1.2
|
|
||||||
aiofiles>=0.8.0
|
|
||||||
playwright==1.22.0
|
|
||||||
pymysql>=0.9.3
|
|
||||||
beautifulsoup4>=4.11.1
|
|
||||||
pyppeteer~=1.0.2
|
|
||||||
lxml>=4.9.0
|
|
||||||
fakeredis>=1.8.1
|
|
||||||
aiohttp<=3.8.1
|
|
||||||
python-telegram-bot==20.0a4
|
|
||||||
pytz>=2021.3
|
|
||||||
Pillow>=9.0.1
|
|
||||||
SQLAlchemy>=1.4.39
|
|
||||||
sqlmodel>=0.0.8
|
|
||||||
asyncmy>=0.2.5
|
|
||||||
python-dotenv>=0.20.0
|
|
||||||
aiolimiter>=1.0.0
|
|
Loading…
Reference in New Issue
Block a user