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