python312Packages.joblib: fix build with python3.12

This commit is contained in:
natsukium 2023-12-07 18:15:51 +09:00 committed by Martin Weinelt
parent 3ed2e0f93d
commit aeec716983
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -2,6 +2,8 @@
, buildPythonPackage
, pythonOlder
, fetchPypi
, fetchpatch
, pythonAtLeast
, stdenv
# build-system
@ -30,6 +32,14 @@ buildPythonPackage rec {
hash = "sha256-kvhl5iHhd4TnlVCAttBCSJ47jilJScxExurDBPWXcrE=";
};
patches = [
(fetchpatch {
name = "suppress-deprecation-warnings-with-python312.patch";
url = "https://github.com/joblib/joblib/commit/05caf0772d605799e5d2337018fd32ac829b37aa.patch";
hash = "sha256-bfqxCLFkCnuWMIkIbcjh+nCTv38A8jxvyCHeJPxoZwg=";
})
];
nativeBuildInputs = [
setuptools
];
@ -54,6 +64,10 @@ buildPythonPackage rec {
"test_nested_parallel_warnings" # tests is flaky under load
] ++ lib.optionals stdenv.isDarwin [
"test_dispatch_multiprocessing" # test_dispatch_multiprocessing is broken only on Darwin.
] ++ lib.optionals (pythonAtLeast "3.12") [
# deprecation warnings with python3.12 https://github.com/joblib/joblib/issues/1478
"test_main_thread_renamed_no_warning"
"test_background_thread_parallelism"
];
meta = with lib; {