1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, msgpack
6, pytestCheckHook
7, numpy
8, pandas
9, pydantic
10, pymongo
11, ruamel-yaml
12, tqdm
13}:
14
15buildPythonPackage rec {
16 pname = "monty";
17 version = "2021.8.17";
18 disabled = pythonOlder "3.5"; # uses type annotations
19
20 src = fetchFromGitHub {
21 owner = "materialsvirtuallab";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "0lg6d0qk6iv476rcn45p5f50kips5g9s709cxddwnk5yrz57c4d0";
25 };
26
27 postPatch = ''
28 substituteInPlace tests/test_os.py \
29 --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
30 '';
31
32 propagatedBuildInputs = [
33 ruamel-yaml
34 tqdm
35 msgpack
36 ];
37
38 checkInputs = [
39 pytestCheckHook
40 numpy
41 pandas
42 pydantic
43 pymongo
44 ];
45
46 meta = with lib; {
47 description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
48 longDescription = "
49 Monty implements supplementary useful functions for Python that are not part of the
50 standard library. Examples include useful utilities like transparent support for zipped files, useful design
51 patterns such as singleton and cached_class, and many more.
52 ";
53 homepage = "https://github.com/materialsvirtuallab/monty";
54 license = licenses.mit;
55 maintainers = with maintainers; [ psyanticy ];
56 };
57}