depot/third_party/nixpkgs/pkgs/development/python-modules/monty/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

56 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, msgpack
, pytestCheckHook
, numpy
, pydantic
, pymongo
, ruamel_yaml
, tqdm
}:
buildPythonPackage rec {
pname = "monty";
version = "2021.3.3";
disabled = pythonOlder "3.5"; # uses type annotations
# No tests in Pypi
src = fetchFromGitHub {
owner = "materialsvirtuallab";
repo = pname;
rev = "v${version}";
sha256 = "1nbv0ys0fv70rgzskkk8gsfr9dsmm7ykim5wv36li840zsj83b1l";
};
propagatedBuildInputs = [
ruamel_yaml
tqdm
msgpack
];
checkInputs = [
pytestCheckHook
numpy
pydantic
pymongo
];
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 ];
};
}