2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, msgpack
|
2021-05-20 23:08:51 +00:00
|
|
|
, numpy
|
2021-09-18 10:52:07 +00:00
|
|
|
, pandas
|
2021-05-20 23:08:51 +00:00
|
|
|
, pydantic
|
2020-04-24 23:36:52 +00:00
|
|
|
, pymongo
|
2023-02-02 18:25:31 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, ruamel-yaml
|
2021-05-20 23:08:51 +00:00
|
|
|
, tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "monty";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "2022.9.9";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "materialsvirtuallab";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-7ToNiRSWxe9nNcaWWmS6bhVqWMEwXN4uiwtjAmuK5qw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_os.py \
|
|
|
|
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
msgpack
|
2021-12-06 16:07:01 +00:00
|
|
|
ruamel-yaml
|
2021-05-20 23:08:51 +00:00
|
|
|
tqdm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
numpy
|
2021-09-18 10:52:07 +00:00
|
|
|
pandas
|
2021-05-20 23:08:51 +00:00
|
|
|
pydantic
|
|
|
|
pymongo
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"monty"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test file was removed and re-added after 2022.9.9
|
|
|
|
"test_reverse_readfile_gz"
|
|
|
|
"test_Path_objects"
|
|
|
|
"test_zopen"
|
|
|
|
"test_zpath"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/materialsvirtuallab/monty/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|