python312Packages.faiss: patch use of deprecated numpy.distutils
This commit is contained in:
parent
44d92674c6
commit
cccb984259
@ -48,11 +48,18 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebookresearch";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
repo = "faiss";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-P8TynU6jz5NbcWLdI7n4LX5Gdz0Ks72bmOzQ3LGjQCQ=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString pythonSupport ''
|
||||
substituteInPlace faiss/python/loader.py \
|
||||
--replace-fail \
|
||||
"# platform-dependent legacy fallback using numpy.distutils.cpuinfo" \
|
||||
"return False"
|
||||
'';
|
||||
|
||||
nativeBuildInputs =
|
||||
[ cmake ]
|
||||
++ lib.optionals cudaSupport [
|
||||
|
Loading…
Reference in New Issue
Block a user