Merge pull request #149920 from jonringer/fix-freegun-py310
This commit is contained in:
commit
296081d9fa
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
|
, pythonAtLeast
|
||||||
|
, fetchpatch
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, python-dateutil
|
, python-dateutil
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
@ -16,6 +18,14 @@ buildPythonPackage rec {
|
||||||
sha256 = "177f9dd59861d871e27a484c3332f35a6e3f5d14626f2bf91be37891f18927f3";
|
sha256 = "177f9dd59861d871e27a484c3332f35a6e3f5d14626f2bf91be37891f18927f3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = lib.optionals (pythonAtLeast "3.10") [
|
||||||
|
# Staticmethods in 3.10+ are now callable, prevent freezegun to attempt to decorate them
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/spulec/freezegun/pull/397/commits/e63874ce75a74a1159390914045fe8e7955b24c4.patch";
|
||||||
|
sha256 = "sha256-FNABqVN5DFqVUR88lYzwbfsZj3xcB9/MvQtm+I2VjnI=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ python-dateutil ];
|
propagatedBuildInputs = [ python-dateutil ];
|
||||||
checkInputs = [ pytestCheckHook ];
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue