From 4ebd9ffc5b11cff884cbc05fc2008f2fe9fe18be Mon Sep 17 00:00:00 2001 From: legendofmiracles Date: Wed, 20 Oct 2021 19:04:16 -0600 Subject: [PATCH] python3Packages.cairocffi: fix cross-compilation, patch out unneeded tests --- .../python-modules/cairocffi/default.nix | 1 - .../python-modules/cairocffi/generic.nix | 14 +++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cairocffi/default.nix b/pkgs/development/python-modules/cairocffi/default.nix index 9b64dbeb66c1..8e26517ba218 100644 --- a/pkgs/development/python-modules/cairocffi/default.nix +++ b/pkgs/development/python-modules/cairocffi/default.nix @@ -8,7 +8,6 @@ , makeFontsConf , freefont_ttf , pytest -, pytest-runner , glibcLocales , cairo , cffi diff --git a/pkgs/development/python-modules/cairocffi/generic.nix b/pkgs/development/python-modules/cairocffi/generic.nix index cdcdbad3395d..004cf8ae7841 100644 --- a/pkgs/development/python-modules/cairocffi/generic.nix +++ b/pkgs/development/python-modules/cairocffi/generic.nix @@ -23,8 +23,20 @@ buildPythonPackage rec { fontDirectories = [ freefont_ttf ]; }; - checkInputs = [ numpy pytest pytest-runner glibcLocales ]; propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib; + propagatedNativeBuildInputs = [ cffi ]; + + # pytestCheckHook does not work + checkInputs = [ numpy pytest glibcLocales ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" \ + --replace "pytest-cov" "" \ + --replace "pytest-flake8" "" \ + --replace "pytest-isort" "" \ + --replace "--flake8 --isort" "" + ''; checkPhase = '' py.test $out/${python.sitePackages}