feat(deps): 新增 uv 的 pyproject.toml 进行依赖管理
This commit is contained in:
4
main.py
4
main.py
@@ -20,7 +20,7 @@ import random
|
|||||||
import ddddocr
|
import ddddocr
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from lxml import etree
|
from lxml import etree # type: ignore
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from requests.adapters import HTTPAdapter
|
from requests.adapters import HTTPAdapter
|
||||||
from urllib3.util.retry import Retry
|
from urllib3.util.retry import Retry
|
||||||
@@ -29,7 +29,7 @@ import warnings
|
|||||||
# 修复 ANTIALIAS 错误 - 添加猴子补丁
|
# 修复 ANTIALIAS 错误 - 添加猴子补丁
|
||||||
import PIL.Image
|
import PIL.Image
|
||||||
if not hasattr(PIL.Image, 'ANTIALIAS'):
|
if not hasattr(PIL.Image, 'ANTIALIAS'):
|
||||||
PIL.Image.ANTIALIAS = PIL.Image.Resampling.LANCZOS
|
PIL.Image.ANTIALIAS = PIL.Image.Resampling.LANCZOS # type: ignore
|
||||||
|
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
|
|||||||
18
pyproject.toml
Normal file
18
pyproject.toml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[project]
|
||||||
|
name = "ckwk"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "刷课"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.13"
|
||||||
|
dependencies = [
|
||||||
|
"ddddocr>=1.5.6",
|
||||||
|
"dotenv>=0.9.9",
|
||||||
|
"lxml>=6.0.2",
|
||||||
|
"pypi-demo",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.uv.sources]
|
||||||
|
pypi-demo = { workspace = true }
|
||||||
|
|
||||||
|
[[tool.uv.index]]
|
||||||
|
url = "https://gitea.kmux.cn/api/packages/python/pypi"
|
||||||
Reference in New Issue
Block a user