From 366e9ffc67303a84d4e87785d7ea9d2cf9aaebd1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 12 Feb 2021 05:42:22 +0100 Subject: python3Packages.fixtures: split dependencies into their correct inputs --- pkgs/development/python-modules/fixtures/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/fixtures/default.nix b/pkgs/development/python-modules/fixtures/default.nix index 9f1549e98f9..43e849415c0 100644 --- a/pkgs/development/python-modules/fixtures/default.nix +++ b/pkgs/development/python-modules/fixtures/default.nix @@ -17,7 +17,17 @@ buildPythonPackage rec { sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef"; }; - propagatedBuildInputs = [ pbr testtools mock ]; + nativeBuildInputs = [ + pbr + ]; + + propagatedBuildInputs = [ + testtools + ]; + + checkInputs = [ + mock + ]; checkPhase = '' ${python.interpreter} -m testtools.run fixtures.test_suite -- cgit 1.4.1 From 77cf2ac9364d7060bbd419d98cc5250d86a1ecd8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 12 Feb 2021 05:42:47 +0100 Subject: python39Packages.fixtures: fix build Drops two tests that try to monkeypatch a classmethod, which breaks due to changes in Python 3.9. The project isn't really that well maintained anymore and Debian started dropping those two tests in November 2020, so let's follow suit --- pkgs/development/python-modules/fixtures/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/fixtures/default.nix b/pkgs/development/python-modules/fixtures/default.nix index 43e849415c0..e802dbaa269 100644 --- a/pkgs/development/python-modules/fixtures/default.nix +++ b/pkgs/development/python-modules/fixtures/default.nix @@ -1,11 +1,12 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch +, pythonAtLeast , pbr , testtools , mock , python -, isPy39 }: buildPythonPackage rec { @@ -17,6 +18,15 @@ buildPythonPackage rec { sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef"; }; + patches = lib.optional (pythonAtLeast "3.9") [ + # drop tests that try to monkeypatch a classmethod, which fails on python3.9 + # https://github.com/testing-cabal/fixtures/issues/44 + (fetchpatch { + url = "https://salsa.debian.org/openstack-team/python/python-fixtures/-/raw/debian/victoria/debian/patches/remove-broken-monkey-patch-test.patch"; + sha256 = "1s3hg2zmqc4shmnf90kscphzj5qlqpxghzw2a59p8f88zrbsj97r"; + }) + ]; + nativeBuildInputs = [ pbr ]; @@ -37,6 +47,5 @@ buildPythonPackage rec { description = "Reusable state for writing clean tests and more"; homepage = "https://pypi.python.org/pypi/fixtures"; license = lib.licenses.asl20; - broken = isPy39; # see https://github.com/testing-cabal/fixtures/issues/44 }; } -- cgit 1.4.1