mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
python310Packages.deprecations: fix tests
This commit is contained in:
parent
1fe644a83f
commit
f5d5398b0e
@ -1,4 +1,11 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, python, packaging, unittest2 }:
|
{ lib, buildPythonPackage, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
|
, packaging
|
||||||
|
, python
|
||||||
|
, pythonAtLeast
|
||||||
|
, pythonOlder
|
||||||
|
, unittest2
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "deprecation";
|
pname = "deprecation";
|
||||||
@ -9,9 +16,22 @@ buildPythonPackage rec {
|
|||||||
sha256 = "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj";
|
sha256 = "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = lib.optionals (pythonAtLeast "3.10") [
|
||||||
|
# fixes for python 3.10 test suite
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/briancurtin/deprecation/pull/57/commits/e13e23068cb8d653a02a434a159e8b0b7226ffd6.patch";
|
||||||
|
sha256 = "sha256-/5zr2V1s5ULUZnbLXsgyHxZH4m7/a27QYuqQt2Savc8=";
|
||||||
|
includes = [ "tests/test_deprecation.py" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ packaging ];
|
propagatedBuildInputs = [ packaging ];
|
||||||
|
|
||||||
checkInputs = [ unittest2 ];
|
# avoiding mass rebuilds for python3.9, but no longer
|
||||||
|
# needed with patch
|
||||||
|
checkInputs = lib.optional (pythonOlder "3.10") [
|
||||||
|
unittest2
|
||||||
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} -m unittest discover
|
${python.interpreter} -m unittest discover
|
||||||
|
Loading…
Reference in New Issue
Block a user