mirror of
https://github.com/open-webui/computer.git
synced 2026-11-22 21:50:43 -05:00
refac
This commit is contained in:
1 parent
04b0f7e0bd
commit
adfd31d645
4 files changed
+8
-5
No files matched your search
@@ -11,7 +11,5 @@ build/
|
||||
cptr/frontend/node_modules/
|
||||
cptr/frontend/.svelte-kit/
|
||||
cptr/frontend/build/
|
||||
*.md
|
||||
LICENSE
|
||||
CONTRIBUTOR_LICENSE_AGREEMENT
|
||||
.DS_Store
|
||||
+2
-2
@@ -12,7 +12,7 @@ RUN npm run build
|
||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS backend-builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY pyproject.toml uv.lock ./
|
||||
COPY pyproject.toml uv.lock LICENSE README.md CHANGELOG.md ./
|
||||
COPY cptr/ cptr/
|
||||
|
||||
# Drop the pre-built frontend into the package tree
|
||||
@@ -40,7 +40,7 @@ USER cptr
|
||||
WORKDIR /home/cptr
|
||||
|
||||
# Install the wheel into an isolated venv
|
||||
COPY --from=backend-builder /dist/*.whl /tmp/
|
||||
COPY --chown=cptr:cptr --from=backend-builder /dist/*.whl /tmp/
|
||||
RUN uv venv /home/cptr/.venv && \
|
||||
uv pip install --python /home/cptr/.venv/bin/python /tmp/*.whl && \
|
||||
rm /tmp/*.whl
|
||||
|
||||
@@ -26,8 +26,10 @@ def parse_changelog(path: Path | None = None) -> dict:
|
||||
}
|
||||
"""
|
||||
if path is None:
|
||||
# Look relative to project root (two levels up from this file)
|
||||
# Look relative to project root (two levels up from this file) or inside the package
|
||||
path = Path(__file__).resolve().parent.parent.parent / "CHANGELOG.md"
|
||||
if not path.exists():
|
||||
path = Path(__file__).resolve().parent.parent / "CHANGELOG.md"
|
||||
|
||||
try:
|
||||
content = path.read_text(encoding="utf-8")
|
||||
|
||||
@@ -39,6 +39,9 @@ build-backend = "hatchling.build"
|
||||
packages = ["cptr"]
|
||||
artifacts = ["cptr/frontend/build"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.force-include]
|
||||
"CHANGELOG.md" = "cptr/CHANGELOG.md"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py39"
|
||||
|
||||
Reference in new issue
Block a user