This commit is contained in:
student_2333 2024-11-12 11:45:45 +08:00
parent 66a4c2e9f8
commit ece94e7f53
No known key found for this signature in database
GPG Key ID: 665F083BEC56F2A6
8 changed files with 11 additions and 47 deletions

View File

@ -24,4 +24,6 @@ jobs:
uses: pdm-project/setup-pdm@v4 uses: pdm-project/setup-pdm@v4
- name: Build and Publish distribution 📦 to PyPI - name: Build and Publish distribution 📦 to PyPI
run: pdm publish run: |-
pdm render
pdm pub-all

View File

@ -1 +0,0 @@
pyproject.toml

View File

@ -1,30 +0,0 @@
[project]
name = "nonebot-plugin-nailongremove-gpu"
version = "%%version%%"
description = "识别目标并撤回图片插件"
authors = [
{ name = "445", email = "2877834692@qq.com" },
{ name = "student_2333", email = "lgc2333@126.com" },
]
requires-python = "<4.0,>=3.9"
dependencies = [
"nonebot-plugin-nailongremove-base==%%version%%",
"%%torch%%",
"onnxruntime-gpu>=1.19.2",
]
license = { text = "MIT" }
readme = "README.md"
keywords = ["nonebot", "plugin", "image"]
[project.urls]
homepage = "https://github.com/Refound-445/nonebot-plugin-nailongremove"
repository = "https://github.com/Refound-445/nonebot-plugin-nailongremove"
[project.optional-dependencies]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.build]
includes = []

View File

@ -0,0 +1 @@
../nonebot-plugin-nailongremove-base/README.md

View File

@ -11,8 +11,8 @@ dev = [
"httpx>=0.27.2", "httpx>=0.27.2",
"beautifulsoup4>=4.12.3", "beautifulsoup4>=4.12.3",
"lxml>=5.3.0", "lxml>=5.3.0",
# "-e file:///${PROJECT_ROOT}/packages/nonebot-plugin-nailongremove-base#egg=nonebot-plugin-nailongremove-base", "-e file:///${PROJECT_ROOT}/packages/nonebot-plugin-nailongremove-base#egg=nonebot-plugin-nailongremove-base",
# "-e file:///${PROJECT_ROOT}/packages/nonebot-plugin-nailongremove-cpu#egg=nonebot-plugin-nailongremove", "-e file:///${PROJECT_ROOT}/packages/nonebot-plugin-nailongremove#egg=nonebot-plugin-nailongremove",
# "-e file:///${PROJECT_ROOT}/packages/nonebot-plugin-nailongremove-gpu#egg=nonebot-plugin-nailongremove-gpu", # "-e file:///${PROJECT_ROOT}/packages/nonebot-plugin-nailongremove-gpu#egg=nonebot-plugin-nailongremove-gpu",
] ]
@ -25,13 +25,4 @@ distribution = false
[tool.pdm.scripts] [tool.pdm.scripts]
render = { call = "scripts.render:main" } render = { call = "scripts.render:main" }
install-base = { shell = "cd packages/nonebot-plugin-nailongremove-base && pdm install && cd ../.." }
install-cpu-s = { shell = "cd packages/nonebot-plugin-nailongremove-cpu && pdm install && cd ../.." }
install-gpu-s = { shell = "cd packages/nonebot-plugin-nailongremove-gpu && pdm install && cd ../.." }
install-cpu = { composite = ["install-base", "install-cpu"] }
install-gpu = { composite = ["install-base", "install-gpu"] }
lock-base = { shell = "cd packages/nonebot-plugin-nailongremove-base && pdm lock && cd ../.." }
pub-all = { call = "scripts.pub_all:main" } pub-all = { call = "scripts.pub_all:main" }

View File

@ -98,14 +98,15 @@ def get_torch_deps() -> str:
return "\n ".join(f'"{x}",' for x in deps).strip(",") return "\n ".join(f'"{x}",' for x in deps).strip(",")
TORCH = get_torch_deps() # TORCH = get_torch_deps()
def process(file_path: Path): def process(file_path: Path):
file_path.with_name(file_path.name.replace(".template", "")).write_text( file_path.with_name(file_path.name.replace(".template", "")).write_text(
file_path.read_text(encoding="u8") (
.replace("%%version%%", VERSION) file_path.read_text(encoding="u8").replace("%%version%%", VERSION)
.replace('"%%torch%%"', TORCH), # .replace('"%%torch%%"', TORCH)
),
"u8", "u8",
) )