1{
2 absl-py,
3 buildPythonPackage,
4 contextlib2,
5 fetchFromGitHub,
6 lib,
7 pyyaml,
8 six,
9 flit-core,
10 pytestCheckHook,
11 pytest-xdist,
12}:
13
14buildPythonPackage rec {
15 pname = "ml-collections";
16 version = "1.1.0";
17 pyproject = true;
18 build-system = [ flit-core ];
19
20 src = fetchFromGitHub {
21 owner = "google";
22 repo = "ml_collections";
23 tag = "v${version}";
24 hash = "sha256-G9+UBqHalzI3quR8T5NEgJs+ep60ffFw9vyTTZDeZ9M=";
25 };
26
27 dependencies = [
28 six
29 absl-py
30 contextlib2
31 pyyaml
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 pytest-xdist
37 ];
38
39 pytestFlagsArray = [
40 "ml_collections/"
41 "--ignore=ml_collections/config_dict/examples/examples_test.py" # From github workflows
42 ];
43
44 pythonImportsCheck = [ "ml_collections" ];
45
46 meta = {
47 description = "ML Collections is a library of Python collections designed for ML usecases";
48 homepage = "https://github.com/google/ml_collections";
49 license = lib.licenses.asl20;
50 maintainers = with lib.maintainers; [ samuela ];
51 };
52}