python3Packages.monty: add missing pydanctic and tqdm dependencies

This commit is contained in:
Martin Weinelt 2021-05-07 21:45:59 +02:00 committed by Jonathan Ringer
parent 96cf2b8582
commit adb0cf013f

View file

@ -1,22 +1,20 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, isPy27 , pythonOlder
, msgpack
, nose , nose
, numpy , numpy
, six , pydantic
, ruamel_yaml
, msgpack
, coverage
, coveralls
, pymongo , pymongo
, lsof , ruamel_yaml
, tqdm
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "monty"; pname = "monty";
version = "2021.3.3"; version = "2021.3.3";
disabled = isPy27; # uses type annotations disabled = pythonOlder "3.5"; # uses type annotations
# No tests in Pypi # No tests in Pypi
src = fetchFromGitHub { src = fetchFromGitHub {
@ -26,21 +24,30 @@ buildPythonPackage rec {
sha256 = "1nbv0ys0fv70rgzskkk8gsfr9dsmm7ykim5wv36li840zsj83b1l"; sha256 = "1nbv0ys0fv70rgzskkk8gsfr9dsmm7ykim5wv36li840zsj83b1l";
}; };
checkInputs = [ lsof nose numpy msgpack coverage coveralls pymongo]; propagatedBuildInputs = [
propagatedBuildInputs = [ six ruamel_yaml ]; ruamel_yaml
tqdm
msgpack
];
# test suite tries to decode bytes, but msgpack now returns a str checkInputs = [
# https://github.com/materialsvirtuallab/monty/pull/121 nose
postPatch = '' numpy
substituteInPlace tests/test_serialization.py \ pydantic
--replace ".decode('utf-8')" "" pymongo
''; ];
preCheck = '' preCheck = ''
substituteInPlace tests/test_os.py \ substituteInPlace tests/test_os.py \
--replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
''; '';
checkPhase = ''
runHook preCheck
nosetests -v
runHook postCheck
'';
meta = with lib; { meta = with lib; {
description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems"; description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
longDescription = " longDescription = "