From a4f0c51c0c96fe6dafcc646101710abf74d497c9 Mon Sep 17 00:00:00 2001 From: Kai Wohlfahrt Date: Sat, 9 Nov 2019 10:24:18 +0000 Subject: [PATCH] pytest-black: patch black dependency This change is pending upstream in #29, but it is stale. --- pkgs/development/python-modules/black/default.nix | 2 +- .../python-modules/pytest-black/black-version.patch | 13 +++++++++++++ .../python-modules/pytest-black/default.nix | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/pytest-black/black-version.patch diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index 6a2ed87162b..00678ca420d 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { sha256 = "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"; }; - buildInputs = [ setuptools_scm ]; + nativeBuildInputs = [ setuptools_scm ]; checkInputs = [ pytest glibcLocales ]; # Necessary for the tests to pass on Darwin with sandbox enabled. diff --git a/pkgs/development/python-modules/pytest-black/black-version.patch b/pkgs/development/python-modules/pytest-black/black-version.patch new file mode 100644 index 00000000000..93bb4180930 --- /dev/null +++ b/pkgs/development/python-modules/pytest-black/black-version.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 5c9ce5f..84b148a 100644 +--- a/setup.py ++++ b/setup.py +@@ -26,6 +26,6 @@ setup( + python_requires=">=2.7", + install_requires=[ + "pytest>=3.5.0", +- 'black==19.3b0; python_version >= "3.6"', ++ 'black; python_version >= "3.6"', + "toml", + ], + use_scm_version=True, \ No newline at end of file diff --git a/pkgs/development/python-modules/pytest-black/default.nix b/pkgs/development/python-modules/pytest-black/default.nix index 508dbdf0863..b129f9eec4b 100644 --- a/pkgs/development/python-modules/pytest-black/default.nix +++ b/pkgs/development/python-modules/pytest-black/default.nix @@ -14,6 +14,7 @@ buildPythonPackage rec { sha256 = "03gwwy1h3qnfh6vpfhgsa5ag53a9sw1g42sc2s8a2hilwb7yrfvm"; }; + patches = [ ./black-version.patch ]; nativeBuildInputs = [ setuptools_scm ]; propagatedBuildInputs = [ black pytest toml ];