anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / dlib / default.nix
blob5faf143daab5cf389474c4a553a35a16ba322db8
2   stdenv,
3   buildPythonPackage,
4   dlib,
5   python,
6   pytestCheckHook,
7   more-itertools,
8   sse4Support ? stdenv.hostPlatform.sse4_1Support,
9   avxSupport ? stdenv.hostPlatform.avxSupport,
12 buildPythonPackage {
13   inherit (dlib)
14     pname
15     version
16     src
17     nativeBuildInputs
18     buildInputs
19     meta
20     ;
22   format = "setuptools";
24   patches = [ ./build-cores.patch ];
26   nativeCheckInputs = [
27     pytestCheckHook
28     more-itertools
29   ];
31   postPatch = ''
32     substituteInPlace setup.py \
33       --replace "more-itertools<6.0.0" "more-itertools" \
34       --replace "pytest==3.8" "pytest"
35   '';
37   setupPyBuildFlags = [
38     "--set USE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
39     "--set USE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}"
40   ];
42   dontUseCmakeConfigure = true;