Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions pkgs/development/python-modules/typer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
pytestCheckHook,
writableTmpDirAsHomeHook,
procps,

# typer or typer-slim
package ? "typer",
}:

buildPythonPackage rec {
pname = "typer";
pname = package;
version = "0.16.0";
pyproject = true;

Expand All @@ -35,15 +38,17 @@ buildPythonPackage rec {
hash = "sha256-WB9PIxagTHutfk3J+mNTVK8bC7TMDJquu3GLBQgaras=";
};

env.TIANGOLO_BUILD_PACKAGE = package;

build-system = [ pdm-backend ];

dependencies = [
click
typing-extensions
# Build includes the standard optional by default
# https://github.com/tiangolo/typer/blob/0.12.3/pyproject.toml#L71-L72
]
++ optional-dependencies.standard;
# typer includes the standard optional by default
# https://github.com/tiangolo/typer/blob/0.12.3/pyproject.toml#L71-L72
++ lib.optionals (package == "typer") optional-dependencies.standard;

optional-dependencies = {
standard = [
Expand All @@ -52,6 +57,8 @@ buildPythonPackage rec {
];
};

doCheck = package == "typer"; # tests expect standard dependencies

nativeCheckInputs = [
coverage # execs coverage in tests
pytest-xdist
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18683,6 +18683,8 @@ self: super: with self; {

typer-shell = callPackage ../development/python-modules/typer-shell { };

typer-slim = self.typer.override { package = "typer-slim"; };

types-aiobotocore = callPackage ../development/python-modules/types-aiobotocore { };

inherit (callPackage ../development/python-modules/types-aiobotocore-packages { })
Expand Down
Loading