python310Packages.typer: add optional-dependencies
This commit is contained in:
parent
5f379c4b68
commit
4bb26cf7a1
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, colorama
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, flit-core
|
, flit-core
|
||||||
|
@ -23,7 +24,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-LVcgpeY/c+rzHtqhX2q4fzXwaQ+MojMBfX0j10OpHXM=";
|
hash = "sha256-LVcgpeY/c+rzHtqhX2q4fzXwaQ+MojMBfX0j10OpHXM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -34,14 +35,20 @@ buildPythonPackage rec {
|
||||||
click
|
click
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.optional-dependencies = {
|
||||||
|
all = [
|
||||||
|
colorama
|
||||||
|
shellingham
|
||||||
|
rich
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestCheckHook
|
|
||||||
pytest-xdist
|
|
||||||
pytest-sugar
|
|
||||||
shellingham
|
|
||||||
rich
|
|
||||||
coverage # execs coverage in tests
|
coverage # execs coverage in tests
|
||||||
];
|
pytest-sugar
|
||||||
|
pytest-xdist
|
||||||
|
pytestCheckHook
|
||||||
|
] ++ passthru.optional-dependencies.all;
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export HOME=$(mktemp -d);
|
export HOME=$(mktemp -d);
|
||||||
|
@ -54,10 +61,12 @@ buildPythonPackage rec {
|
||||||
"test_install_completion"
|
"test_install_completion"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "typer" ];
|
pythonImportsCheck = [
|
||||||
|
"typer"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Python library for building CLI applications";
|
description = "Library for building CLI applications";
|
||||||
homepage = "https://typer.tiangolo.com/";
|
homepage = "https://typer.tiangolo.com/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ winpat ];
|
maintainers = with maintainers; [ winpat ];
|
||||||
|
|
Loading…
Reference in a new issue