1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 numpy,
11 tensorflow,
12 pythonAtLeast,
13 distutils,
14
15 # tests
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "tf-keras";
21 version = "2.20.1";
22 pyproject = true;
23
24 src = fetchPypi {
25 pname = "tf_keras";
26 inherit version;
27 hash = "sha256-iEvlk4+wsrU7FYPBritmDvhyFTd8KbW2p3/SIbRyrq8=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 dependencies = [
35 numpy
36 tensorflow
37 ]
38 ++ lib.optionals (pythonAtLeast "3.12") [ distutils ];
39
40 pythonImportsCheck = [ "tf_keras" ];
41
42 nativeCheckInputs = [ pytestCheckHook ];
43
44 meta = {
45 description = "Deep learning for humans";
46 homepage = "https://pypi.org/project/tf-keras/";
47 license = lib.licenses.asl20;
48 maintainers = with lib.maintainers; [ GaetanLepage ];
49 };
50}