From f26b55bc5f957ef1ea4fae14709e62a0f03466a8 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 3 Jul 2025 14:43:07 +0300 Subject: [PATCH] Use uv build backend uv's build backend expects our module to be in src. --- pyproject.toml | 7 +++---- .../dspace_statistics_api}/__init__.py | 0 .../dspace_statistics_api}/app.py | 0 .../dspace_statistics_api}/config.py | 0 .../dspace_statistics_api}/database.py | 0 .../dspace_statistics_api}/docs/openapi.json | 0 .../dspace_statistics_api}/indexer.py | 0 .../dspace_statistics_api}/stats.py | 0 .../dspace_statistics_api}/util.py | 0 9 files changed, 3 insertions(+), 4 deletions(-) rename {dspace_statistics_api => src/dspace_statistics_api}/__init__.py (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/app.py (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/config.py (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/database.py (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/docs/openapi.json (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/indexer.py (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/stats.py (100%) rename {dspace_statistics_api => src/dspace_statistics_api}/util.py (100%) diff --git a/pyproject.toml b/pyproject.toml index f6acf61..03daa76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,11 +25,10 @@ homepage = "https://github.com/ilri/dspace-statistics-api" [tool.uv.sources] falcon-swagger-ui = { git = "https://github.com/alanorth/falcon-swagger-ui", rev = "falcon3-update-swagger-ui" } -# So uv doesn't fall back to setuptools -# See: https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-build-backend +# See: https://docs.astral.sh/uv/concepts/build-backend/#using-the-uv-build-backend [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.7.19,<0.8.0"] +build-backend = "uv_build" [dependency-groups] dev = [ diff --git a/dspace_statistics_api/__init__.py b/src/dspace_statistics_api/__init__.py similarity index 100% rename from dspace_statistics_api/__init__.py rename to src/dspace_statistics_api/__init__.py diff --git a/dspace_statistics_api/app.py b/src/dspace_statistics_api/app.py similarity index 100% rename from dspace_statistics_api/app.py rename to src/dspace_statistics_api/app.py diff --git a/dspace_statistics_api/config.py b/src/dspace_statistics_api/config.py similarity index 100% rename from dspace_statistics_api/config.py rename to src/dspace_statistics_api/config.py diff --git a/dspace_statistics_api/database.py b/src/dspace_statistics_api/database.py similarity index 100% rename from dspace_statistics_api/database.py rename to src/dspace_statistics_api/database.py diff --git a/dspace_statistics_api/docs/openapi.json b/src/dspace_statistics_api/docs/openapi.json similarity index 100% rename from dspace_statistics_api/docs/openapi.json rename to src/dspace_statistics_api/docs/openapi.json diff --git a/dspace_statistics_api/indexer.py b/src/dspace_statistics_api/indexer.py similarity index 100% rename from dspace_statistics_api/indexer.py rename to src/dspace_statistics_api/indexer.py diff --git a/dspace_statistics_api/stats.py b/src/dspace_statistics_api/stats.py similarity index 100% rename from dspace_statistics_api/stats.py rename to src/dspace_statistics_api/stats.py diff --git a/dspace_statistics_api/util.py b/src/dspace_statistics_api/util.py similarity index 100% rename from dspace_statistics_api/util.py rename to src/dspace_statistics_api/util.py