Move build system from setuptools to uv, wire uv into CI/CD
Convert both pyproject.toml files to the uv_build backend and turn the repo into a proper uv workspace (plotstyle moved to src layout, since uv_build requires the module in its own subdirectory). Dev tooling moves from an optional-dependencies extra to a dependency-group, and plotstyle's matplotlib dependency is now its own rather than a gallery "plotting" extra. Gitea Actions workflows and the Dockerfile now use astral-sh/setup-uv, uv sync, uv run, uv build, and uv publish throughout instead of pip, build, and twine. Also fixes .dockerignore, which was excluding uv.lock, deploy/, and README.md and would have broken even the previous Dockerfile's COPY of deploy/entrypoint.sh. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+10
-13
@@ -1,6 +1,6 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=83.0.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
requires = ["uv_build>=0.11.19,<0.12.0"]
|
||||
build-backend = "uv_build"
|
||||
|
||||
[project]
|
||||
name = "gallery"
|
||||
@@ -43,25 +43,22 @@ dependencies = [
|
||||
"textual>=0.50",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
[project.scripts]
|
||||
gallery = "gallery.cli:main"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest>=7.0",
|
||||
"ruff>=0.6",
|
||||
"ty>=0.0.1",
|
||||
"pip-audit>=2.7",
|
||||
"setuptools>=83.0.0",
|
||||
]
|
||||
plotting = [
|
||||
"matplotlib>=3.7",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
gallery = "gallery.cli:main"
|
||||
[tool.uv.workspace]
|
||||
members = ["plotstyle"]
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["gallery", "gallery.utils", "gallery.config", "plotstyle"]
|
||||
package-data = {gallery = ["templates/*", "assets/css/*", "assets/js/*", "config/*"], plotstyle = ["assets/*.mplstyle"]}
|
||||
include-package-data = true
|
||||
[tool.uv.build-backend]
|
||||
module-root = ""
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
|
||||
Reference in New Issue
Block a user