3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/black/default.nix

36 lines
1 KiB
Nix
Raw Normal View History

2018-07-23 16:45:58 +01:00
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
, attrs, click, toml, appdirs, aiohttp
2018-07-23 16:45:58 +01:00
, glibcLocales, pytest }:
buildPythonPackage rec {
pname = "black";
version = "19.3b0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "073kd5rs02lisp6n3h7yai9lix520xnaa6c7rdmp2sci9pyhz5b8";
};
2018-07-23 16:45:58 +01:00
checkInputs = [ pytest glibcLocales ];
# Don't know why these tests fails
2018-07-23 16:45:58 +01:00
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
2018-07-23 16:45:58 +01:00
'';
propagatedBuildInputs = [ attrs appdirs click toml aiohttp ];
meta = with stdenv.lib; {
description = "The uncompromising Python code formatter";
homepage = https://github.com/ambv/black;
license = licenses.mit;
maintainers = with maintainers; [ sveitser ];
};
}