From bec6019f95eff02925dfc4daf3d4a99b7cde06c8 Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 7 Aug 2025 22:39:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20`uv`=20build=20backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 27 ++++++++------------------- src/_numtype/__init__.py | 1 + 2 files changed, 9 insertions(+), 19 deletions(-) create mode 100644 src/_numtype/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 4511f709..85dc7b3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,11 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8"] +build-backend = "uv_build" + +[tool.uv.build-backend] +module-name = ["numpy-stubs", "_numtype", "numtype"] +module-root = "src" +source-exclude = ['\@test', ".ruff_cache", ".ruff.toml"] [project] name = "numtype" @@ -10,6 +15,7 @@ readme = "README.md" authors = [{ name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com" }] maintainers = [{ name = "NumPy Developers", email = "numpy-discussion@python.org" }] license = "BSD-3-Clause" +license-files = ["LICENSE"] keywords = ["numpy", "typing", "stubs"] classifiers = [ "Development Status :: 3 - Alpha", @@ -90,23 +96,6 @@ dev = [ { include-group = "docs" }, ] -# hatch - -[tool.hatch.build] -exclude = [ - "**/@test", - "**/*.yml", - "**/.*", - "/docs", - "/tool", - "CONTRIBUTING.md", - "uv.lock", -] -skip-excluded-dirs = true - -[tool.hatch.build.targets.wheel] -packages = ["src/_numtype", "src/numtype", "src/numpy-stubs"] - # mypy [tool.mypy] diff --git a/src/_numtype/__init__.py b/src/_numtype/__init__.py new file mode 100644 index 00000000..8ce221f0 --- /dev/null +++ b/src/_numtype/__init__.py @@ -0,0 +1 @@ +raise ImportError("_numtype should not be imported at runtime") # noqa: EM101, TRY003