3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/monty/default.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, nose
, numpy
, six
, ruamel_yaml
, msgpack
, coverage
, coveralls
, pymongo
, lsof
}:
2018-06-22 12:54:26 +01:00
buildPythonPackage rec {
pname = "monty";
2019-11-05 16:48:58 +00:00
version = "3.0.2";
disabled = isPy27; # uses type annotations
2018-06-22 12:54:26 +01:00
# No tests in Pypi
src = fetchFromGitHub {
owner = "materialsvirtuallab";
repo = pname;
rev = "v${version}";
2019-11-05 16:48:58 +00:00
sha256 = "1wxqxp0j7i6czdpr2r1imgmy3qbgn2l7d4za2h1lg3hllvx6jra1";
2018-06-22 12:54:26 +01:00
};
checkInputs = [ lsof nose numpy msgpack coverage coveralls pymongo];
propagatedBuildInputs = [ six ruamel_yaml ];
2020-04-06 20:21:27 +01:00
# test suite tries to decode bytes, but msgpack now returns a str
# https://github.com/materialsvirtuallab/monty/pull/121
postPatch = ''
substituteInPlace tests/test_serialization.py \
--replace ".decode('utf-8')" ""
'';
2018-06-22 12:54:26 +01:00
preCheck = ''
substituteInPlace tests/test_os.py \
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
2018-06-22 12:54:26 +01: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";
2018-06-22 12:54:26 +01:00
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
2018-06-22 12:54:26 +01:00
patterns such as singleton and cached_class, and many more.
";
homepage = "https://github.com/materialsvirtuallab/monty";
2018-06-22 12:54:26 +01:00
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};
}