2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, msgpack
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, numpy
|
|
|
|
, pydantic
|
2020-04-24 23:36:52 +00:00
|
|
|
, pymongo
|
2021-05-20 23:08:51 +00:00
|
|
|
, ruamel_yaml
|
|
|
|
, tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "monty";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "2021.6.10";
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.5"; # uses type annotations
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# No tests in Pypi
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "materialsvirtuallab";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "01fhl4pl5gj4ahph4lxcm0fmglh0bjw6jz9ckmgzviasg4l1j6h4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ruamel_yaml
|
|
|
|
tqdm
|
|
|
|
msgpack
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
numpy
|
|
|
|
pydantic
|
|
|
|
pymongo
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace tests/test_os.py \
|
|
|
|
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
|
|
|
|
longDescription = "
|
|
|
|
Monty implements supplementary useful functions for Python that are not part of the
|
|
|
|
standard library. Examples include useful utilities like transparent support for zipped files, useful design
|
|
|
|
patterns such as singleton and cached_class, and many more.
|
|
|
|
";
|
|
|
|
homepage = "https://github.com/materialsvirtuallab/monty";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|