mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
Merge pull request #120684 from sveitser/python3-black-update
python3Packages.black: 20.8b1 -> 21.4b2
This commit is contained in:
commit
1c2986bbb8
@ -8,6 +8,7 @@
|
||||
, dataclasses
|
||||
, mypy-extensions
|
||||
, pathspec
|
||||
, parameterized
|
||||
, regex
|
||||
, toml
|
||||
, typed-ast
|
||||
@ -15,13 +16,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "black";
|
||||
version = "20.8b1";
|
||||
version = "21.5b1";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw";
|
||||
sha256 = "1cdkrl5vw26iy7s23v2zpr39m6g5xsgxhfhagzzflgfbvdc56s93";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools_scm ];
|
||||
@ -30,19 +31,19 @@ buildPythonPackage rec {
|
||||
# Black starts a local server and needs to bind a local address.
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
checkInputs = [ pytestCheckHook parameterized ];
|
||||
|
||||
preCheck = ''
|
||||
export PATH="$PATH:$out/bin"
|
||||
|
||||
# The top directory /build matches black's DEFAULT_EXCLUDE regex.
|
||||
# Make /build the project root for black tests to avoid excluding files.
|
||||
touch ../.git
|
||||
'';
|
||||
|
||||
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"
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
|
||||
, black, toml, pytest, python-language-server, isPy3k
|
||||
}:
|
||||
|
||||
@ -13,6 +13,15 @@ buildPythonPackage rec {
|
||||
sha256 = "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj";
|
||||
};
|
||||
|
||||
# Fix test failure with black 21.4b0+
|
||||
# Remove if https://github.com/rupert/pyls-black/pull/39 merged.
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/rupert/pyls-black/commit/728207b540d9c25eb0d1cd96419ebfda2e257f63.patch";
|
||||
sha256 = "0i3w5myhjl5lq1lpkizagnmk6m8fkn3igfyv5f2qcrn5n7f119ak";
|
||||
})
|
||||
];
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
checkPhase = ''
|
||||
|
Loading…
Reference in New Issue
Block a user