pythonPackages.black: Move optional deps to passthru

This commit is contained in:
Sebastian Jordan 2022-09-22 19:04:15 +02:00 committed by Frederik Rietdijk
parent c326066800
commit 2076f54b4a

View File

@ -19,7 +19,6 @@
, uvloop
}:
buildPythonPackage rec {
pname = "black";
version = "22.8.0";
@ -37,7 +36,7 @@ buildPythonPackage rec {
# Black starts a local server and needs to bind a local address.
__darwinAllowLocalNetworking = true;
checkInputs = [ pytestCheckHook parameterized ];
checkInputs = [ pytestCheckHook parameterized aiohttp ];
preCheck = ''
export PATH="$PATH:$out/bin"
@ -64,18 +63,20 @@ buildPythonPackage rec {
doCheck = !(stdenv.isLinux && stdenv.isAarch64);
propagatedBuildInputs = [
aiohttp
aiohttp-cors
click
colorama
mypy-extensions
pathspec
platformdirs
tomli
uvloop
] ++ lib.optional (pythonOlder "3.8") typed-ast
++ lib.optional (pythonOlder "3.10") typing-extensions;
passthru.optional-dependencies = {
d = [ aiohttp aiohttp-cors ];
colorama = [ colorama ];
uvloop = [ uvloop ];
};
meta = with lib; {
description = "The uncompromising Python code formatter";
homepage = "https://github.com/psf/black";