2017-09-07 09:17:55 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-02-12 04:42:47 +00:00
|
|
|
, fetchpatch
|
|
|
|
, pythonAtLeast
|
2017-09-07 09:17:55 +01:00
|
|
|
, pbr
|
|
|
|
, testtools
|
|
|
|
, mock
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fixtures";
|
2017-09-07 09:18:44 +01:00
|
|
|
version = "3.0.0";
|
2017-09-07 09:17:55 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-09-07 09:18:44 +01:00
|
|
|
sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef";
|
2017-09-07 09:17:55 +01:00
|
|
|
};
|
|
|
|
|
2021-02-12 04:42:47 +00:00
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-12 04:42:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pbr
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
testtools
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
];
|
2017-09-07 09:17:55 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m testtools.run fixtures.test_suite
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Reusable state for writing clean tests and more";
|
|
|
|
homepage = "https://pypi.python.org/pypi/fixtures";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
2020-08-25 03:07:09 +01:00
|
|
|
}
|