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.19.0";
22 pyproject = true;
23
24 src = fetchPypi {
25 pname = "tf_keras";
26 inherit version;
27 hash = "sha256-sJpAfYekVxzh6MqYXPxoSD49Y7JRil15qXrZLLZNvpw=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 dependencies = [
35 numpy
36 tensorflow
37 ] ++ lib.optionals (pythonAtLeast "3.12") [ distutils ];
38
39 pythonImportsCheck = [ "tf_keras" ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 meta = {
44 description = "Deep learning for humans";
45 homepage = "https://pypi.org/project/tf-keras/";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [ GaetanLepage ];
48 };
49}