python.pkgs.black: 19.10b0 -> 20.8b1
This commit is contained in:
parent
f75c8753d8
commit
c7cb72b0ca
|
@ -1,42 +1,71 @@
|
||||||
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
|
{ stdenv, lib
|
||||||
, attrs, click, toml, appdirs, aiohttp, aiohttp-cors
|
, buildPythonPackage, fetchPypi, pythonOlder, setuptools_scm, pytestCheckHook
|
||||||
, glibcLocales, typed-ast, pathspec, regex
|
, aiohttp
|
||||||
, setuptools_scm, pytest }:
|
, aiohttp-cors
|
||||||
|
, appdirs
|
||||||
|
, attrs
|
||||||
|
, click
|
||||||
|
, mypy-extensions
|
||||||
|
, pathspec
|
||||||
|
, regex
|
||||||
|
, toml
|
||||||
|
, typed-ast
|
||||||
|
, typing-extensions }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "black";
|
pname = "black";
|
||||||
version = "19.10b0";
|
version = "20.8b1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2";
|
sha256 = "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools_scm ];
|
nativeBuildInputs = [ setuptools_scm ];
|
||||||
checkInputs = [ pytest glibcLocales ];
|
|
||||||
|
|
||||||
# Necessary for the tests to pass on Darwin with sandbox enabled.
|
# Necessary for the tests to pass on Darwin with sandbox enabled.
|
||||||
# Black starts a local server and needs to bind a local address.
|
# Black starts a local server and needs to bind a local address.
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
# Don't know why these tests fails
|
checkInputs = [ pytestCheckHook ];
|
||||||
# Disable test_expression_diff, because it fails on darwin
|
|
||||||
checkPhase = ''
|
preCheck = ''
|
||||||
LC_ALL="en_US.UTF-8" pytest \
|
export PATH="$PATH:$out/bin"
|
||||||
--deselect tests/test_black.py::BlackTestCase::test_expression_diff \
|
|
||||||
--deselect tests/test_black.py::BlackTestCase::test_cache_multiple_files \
|
|
||||||
--deselect tests/test_black.py::BlackTestCase::test_failed_formatting_does_not_get_cached
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ attrs appdirs click toml aiohttp aiohttp-cors pathspec regex typed-ast ];
|
disabledTests = [
|
||||||
|
# Don't know why these tests fails
|
||||||
|
"test_cache_multiple_files"
|
||||||
|
"test_failed_formatting_does_not_get_cached"
|
||||||
|
# requires network access
|
||||||
|
"test_gen_check_output"
|
||||||
|
"test_process_queue"
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
# fails on darwin
|
||||||
|
"test_expression_diff"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
propagatedBuildInputs = [
|
||||||
|
aiohttp
|
||||||
|
aiohttp-cors
|
||||||
|
appdirs
|
||||||
|
attrs
|
||||||
|
click
|
||||||
|
mypy-extensions
|
||||||
|
pathspec
|
||||||
|
regex
|
||||||
|
toml
|
||||||
|
typed-ast
|
||||||
|
typing-extensions
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "The uncompromising Python code formatter";
|
description = "The uncompromising Python code formatter";
|
||||||
homepage = "https://github.com/psf/black";
|
homepage = "https://github.com/psf/black";
|
||||||
|
changelog = "https://github.com/psf/black/blob/${version}/CHANGES.md";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ sveitser ];
|
maintainers = with maintainers; [ sveitser ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue