From 2320acfc0c2a82b235e73669b40f01743740934c Mon Sep 17 00:00:00 2001 From: 34j <34j.github@proton.me> Date: Mon, 16 Jun 2025 14:59:22 +0900 Subject: [PATCH] fix: make dependencies optional --- pyproject.toml | 11 ++++++++--- uv.lock | 19 +++++++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9eb655a..5970f2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,11 +26,13 @@ classifiers = [ ] dependencies = [ - "attrs>=25.3.0", - "rich>=10", - "typer>=0.15,<1", "typing-extensions>=4.14.0", ] +optional-dependencies.cli = [ + "attrs>=25.3.0", + "rich>=14", + "typer>=0.16", +] urls."Bug Tracker" = "https://github.com/34j/types-array-api/issues" urls.Changelog = "https://github.com/34j/types-array-api/blob/main/CHANGELOG.md" urls.documentation = "https://array-api.readthedocs.io" @@ -41,9 +43,12 @@ scripts.array-api = "array_api.cli:app" dev = [ "array-api-compat>=1.11.2", "array-api-strict>=2.3.1", + "attrs>=25.3.0", "pytest>=8,<9", "pytest-cov>=6,<7", + "rich>=14.0.0", "ruff>=0.11.13", + "typer>=0.16.0", ] docs = [ "furo>=2023.5.20; python_version>='3.11'", diff --git a/uv.lock b/uv.lock index 4dcbbde..23025d3 100644 --- a/uv.lock +++ b/uv.lock @@ -1017,10 +1017,14 @@ name = "types-array-api" version = "1.1.1" source = { editable = "." } dependencies = [ + { name = "typing-extensions" }, +] + +[package.optional-dependencies] +cli = [ { name = "attrs" }, { name = "rich" }, { name = "typer" }, - { name = "typing-extensions" }, ] [package.dev-dependencies] @@ -1028,9 +1032,12 @@ dev = [ { name = "array-api-compat", version = "1.11.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "array-api-compat", version = "1.12.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "array-api-strict" }, + { name = "attrs" }, { name = "pytest" }, { name = "pytest-cov" }, + { name = "rich" }, { name = "ruff" }, + { name = "typer" }, ] docs = [ { name = "furo", marker = "python_full_version >= '3.11'" }, @@ -1041,19 +1048,23 @@ docs = [ [package.metadata] requires-dist = [ - { name = "attrs", specifier = ">=25.3.0" }, - { name = "rich", specifier = ">=10" }, - { name = "typer", specifier = ">=0.15,<1" }, + { name = "attrs", marker = "extra == 'cli'", specifier = ">=25.3.0" }, + { name = "rich", marker = "extra == 'cli'", specifier = ">=14" }, + { name = "typer", marker = "extra == 'cli'", specifier = ">=0.16" }, { name = "typing-extensions", specifier = ">=4.14.0" }, ] +provides-extras = ["cli"] [package.metadata.requires-dev] dev = [ { name = "array-api-compat", specifier = ">=1.11.2" }, { name = "array-api-strict", specifier = ">=2.3.1" }, + { name = "attrs", specifier = ">=25.3.0" }, { name = "pytest", specifier = ">=8,<9" }, { name = "pytest-cov", specifier = ">=6,<7" }, + { name = "rich", specifier = ">=14.0.0" }, { name = "ruff", specifier = ">=0.11.13" }, + { name = "typer", specifier = ">=0.16.0" }, ] docs = [ { name = "furo", marker = "python_full_version >= '3.11'", specifier = ">=2023.5.20" },