mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-30 09:00:19 +02:00
Merge pull request #112854 from mweinelt/python/fixtures
This commit is contained in:
commit
f558ed1ea5
|
@ -1,11 +1,12 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
|
, pythonAtLeast
|
||||||
, pbr
|
, pbr
|
||||||
, testtools
|
, testtools
|
||||||
, mock
|
, mock
|
||||||
, python
|
, python
|
||||||
, isPy39
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -17,7 +18,26 @@ buildPythonPackage rec {
|
||||||
sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef";
|
sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ pbr testtools mock ];
|
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
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
testtools
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
mock
|
||||||
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} -m testtools.run fixtures.test_suite
|
${python.interpreter} -m testtools.run fixtures.test_suite
|
||||||
|
@ -27,6 +47,5 @@ buildPythonPackage rec {
|
||||||
description = "Reusable state for writing clean tests and more";
|
description = "Reusable state for writing clean tests and more";
|
||||||
homepage = "https://pypi.python.org/pypi/fixtures";
|
homepage = "https://pypi.python.org/pypi/fixtures";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
broken = isPy39; # see https://github.com/testing-cabal/fixtures/issues/44
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue