Merge pull request #126642 from austinbutler/fix-black-darwin
python3Packages.black: 21.5b1 -> 21.6b0
This commit is contained in:
commit
338576f9c7
|
@ -5,6 +5,7 @@
|
|||
, appdirs
|
||||
, attrs
|
||||
, click
|
||||
, colorama
|
||||
, dataclasses
|
||||
, mypy-extensions
|
||||
, pathspec
|
||||
|
@ -12,17 +13,20 @@
|
|||
, regex
|
||||
, toml
|
||||
, typed-ast
|
||||
, typing-extensions }:
|
||||
, typing-extensions
|
||||
, uvloop
|
||||
}:
|
||||
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "black";
|
||||
version = "21.5b1";
|
||||
version = "21.6b0";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1cdkrl5vw26iy7s23v2zpr39m6g5xsgxhfhagzzflgfbvdc56s93";
|
||||
sha256 = "016f6bhnnnbcrrh3cvmpk77ww0nykv5n1qvgf8b3044dm14264yw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
|
@ -31,7 +35,7 @@ buildPythonPackage rec {
|
|||
# Black starts a local server and needs to bind a local address.
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
checkInputs = [ pytestCheckHook parameterized ];
|
||||
checkInputs = [ pytestCheckHook parameterized ];
|
||||
|
||||
preCheck = ''
|
||||
export PATH="$PATH:$out/bin"
|
||||
|
@ -39,6 +43,9 @@ buildPythonPackage rec {
|
|||
# The top directory /build matches black's DEFAULT_EXCLUDE regex.
|
||||
# Make /build the project root for black tests to avoid excluding files.
|
||||
touch ../.git
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# Work around https://github.com/psf/black/issues/2105
|
||||
export TMPDIR="/tmp"
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
|
@ -55,19 +62,21 @@ buildPythonPackage rec {
|
|||
appdirs
|
||||
attrs
|
||||
click
|
||||
colorama
|
||||
mypy-extensions
|
||||
pathspec
|
||||
regex
|
||||
toml
|
||||
typed-ast
|
||||
typing-extensions
|
||||
] ++ lib.optional (pythonOlder "3.7") dataclasses;
|
||||
typed-ast # required for tests and python2 extra
|
||||
uvloop
|
||||
] ++ lib.optional (pythonOlder "3.7") dataclasses
|
||||
++ lib.optional (pythonOlder "3.8") typing-extensions;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The uncompromising Python code formatter";
|
||||
homepage = "https://github.com/psf/black";
|
||||
changelog = "https://github.com/psf/black/blob/${version}/CHANGES.md";
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/psf/black";
|
||||
changelog = "https://github.com/psf/black/blob/${version}/CHANGES.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sveitser ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue