From 18b072979098d12b9eb4e5c8efe875b2407a94a5 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 10 Mar 2019 16:44:31 +0100 Subject: [PATCH] pythonPackages.jaraco_logging: fix build The package currently fails because of some flake8 violations. However invalid coding style shouldn't break the Nix package. See also https://hydra.nixos.org/build/90301692 Addresses #56826 --- ...t-run-flake8-checks-during-the-build.patch | 38 +++++++++++++++++++ .../python-modules/jaraco_logging/default.nix | 7 +++- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/python-modules/jaraco_logging/0001-Don-t-run-flake8-checks-during-the-build.patch diff --git a/pkgs/development/python-modules/jaraco_logging/0001-Don-t-run-flake8-checks-during-the-build.patch b/pkgs/development/python-modules/jaraco_logging/0001-Don-t-run-flake8-checks-during-the-build.patch new file mode 100644 index 000000000000..aab9604b9ce8 --- /dev/null +++ b/pkgs/development/python-modules/jaraco_logging/0001-Don-t-run-flake8-checks-during-the-build.patch @@ -0,0 +1,38 @@ +From 4b9801d9bbe535fd6719933b96278915573e3595 Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch +Date: Sun, 10 Mar 2019 16:42:21 +0100 +Subject: [PATCH] Don't run flake8 checks during the build + +If the code simply violates their code style, the Nix package shouldn't fail. +--- + pytest.ini | 2 +- + setup.cfg | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/pytest.ini b/pytest.ini +index 9b3c1ec..a5189c1 100644 +--- a/pytest.ini ++++ b/pytest.ini +@@ -1,6 +1,6 @@ + [pytest] + norecursedirs=dist build .tox .eggs +-addopts=--doctest-modules --flake8 ++addopts=--doctest-modules + doctest_optionflags=ALLOW_UNICODE ELLIPSIS + filterwarnings= + ignore:Possible nested set::pycodestyle:113 +diff --git a/setup.cfg b/setup.cfg +index 3e7bbed..5cac7a2 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -29,7 +29,6 @@ setup_requires = setuptools_scm >= 1.15.0 + testing = + pytest >= 3.5, !=3.7.3 + pytest-checkdocs +- pytest-flake8 + docs = + sphinx + jaraco.packaging >= 3.2 +-- +2.18.1 + diff --git a/pkgs/development/python-modules/jaraco_logging/default.nix b/pkgs/development/python-modules/jaraco_logging/default.nix index 68fba6bfb5fb..ae05a76da1d5 100644 --- a/pkgs/development/python-modules/jaraco_logging/default.nix +++ b/pkgs/development/python-modules/jaraco_logging/default.nix @@ -1,5 +1,6 @@ { lib, buildPythonPackage, fetchPypi, setuptools_scm -, tempora, six, pytest, pytest-flake8 }: +, tempora, six, pytest +}: buildPythonPackage rec { pname = "jaraco.logging"; @@ -10,9 +11,11 @@ buildPythonPackage rec { sha256 = "1lb846j7qs1hgqwkyifv51nhl3f8jimbc4lk8yn9nkaynw0vyzcg"; }; + patches = [ ./0001-Don-t-run-flake8-checks-during-the-build.patch ]; + buildInputs = [ setuptools_scm ]; propagatedBuildInputs = [ tempora six ]; - checkInputs = [ pytest pytest-flake8 ]; + checkInputs = [ pytest ]; checkPhase = '' PYTHONPATH=".:$PYTHONPATH" pytest