aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-09 18:55:19 +0000
committerMx Kookie <kookie@spacekookie.de>2020-12-09 18:55:19 +0000
commit80d90d9b204f7c17912740f9f414fe5d59f293ba (patch)
tree5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix
parent3a31a84c7d3e589035ad08499206aac44a81f424 (diff)
parent83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff)
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix63
1 files changed, 46 insertions, 17 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix
index 997f20e137db..f0a25dfb0b12 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/black/default.nix
@@ -1,42 +1,71 @@
-{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
-, attrs, click, toml, appdirs, aiohttp, aiohttp-cors
-, glibcLocales, typed-ast, pathspec, regex
-, setuptools_scm, pytest }:
+{ stdenv, lib
+, buildPythonPackage, fetchPypi, pythonOlder, setuptools_scm, pytestCheckHook
+, aiohttp
+, aiohttp-cors
+, appdirs
+, attrs
+, click
+, mypy-extensions
+, pathspec
+, regex
+, toml
+, typed-ast
+, typing-extensions }:
buildPythonPackage rec {
pname = "black";
- version = "19.10b0";
+ version = "20.8b1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
- sha256 = "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2";
+ sha256 = "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw";
};
nativeBuildInputs = [ setuptools_scm ];
- checkInputs = [ pytest glibcLocales ];
# Necessary for the tests to pass on Darwin with sandbox enabled.
# Black starts a local server and needs to bind a local address.
__darwinAllowLocalNetworking = true;
- # Don't know why these tests fails
- # Disable test_expression_diff, because it fails on darwin
- checkPhase = ''
- LC_ALL="en_US.UTF-8" pytest \
- --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
+ checkInputs = [ pytestCheckHook ];
+
+ preCheck = ''
+ export PATH="$PATH:$out/bin"
'';
- 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"
+ ];
+
+ propagatedBuildInputs = [
+ aiohttp
+ aiohttp-cors
+ appdirs
+ attrs
+ click
+ mypy-extensions
+ pathspec
+ regex
+ toml
+ typed-ast
+ typing-extensions
+ ];
- meta = with stdenv.lib; {
+ 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;
maintainers = with maintainers; [ sveitser ];
};
-
}