From d54485a14561246cd6c749090f5979fee1853f7c Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 24 Feb 2019 13:12:55 -0500 Subject: [PATCH] pythonPackages.monty: 1.0.2 -> 1.0.4 and cleanup broken tests --- .../python-modules/monty/default.nix | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/monty/default.nix b/pkgs/development/python-modules/monty/default.nix index e53098f6f232..4675a3860549 100644 --- a/pkgs/development/python-modules/monty/default.nix +++ b/pkgs/development/python-modules/monty/default.nix @@ -1,33 +1,42 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, nose, numpy, six, ruamel_yaml, msgpack-python, coverage, coveralls, pymongo, lsof }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, nose +, numpy +, six +, ruamel_yaml +, msgpack-python +, coverage +, coveralls +, pymongo +, lsof +}: buildPythonPackage rec { pname = "monty"; - version = "1.0.2"; + version = "1.0.4"; # No tests in Pypi src = fetchFromGitHub { owner = "materialsvirtuallab"; repo = pname; rev = "v${version}"; - sha256 = "0ss70fanavqdpj56yymj06lacgnknb4ap39m2q28v9lz32cs6xdg"; + sha256 = "0vqaaz0dw0ypl6sfwbycpb0qs3ap04c4ghbggklxih66spdlggh6"; }; - propagatedBuildInputs = [ nose numpy six ruamel_yaml msgpack-python coverage coveralls pymongo lsof ]; - + checkInputs = [ lsof nose numpy msgpack-python coverage coveralls pymongo]; + propagatedBuildInputs = [ six ruamel_yaml ]; + preCheck = '' substituteInPlace tests/test_os.py \ - --replace 'def test_which(self):' '#' \ - --replace 'py = which("python")' '#' \ - --replace 'self.assertEqual(os.path.basename(py), "python")' '#' \ - --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' \ - --replace 'self.assertIs(which("non_existent_exe"), None)' '#' \ + --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' ''; - meta = with stdenv.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"; 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 + 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; @@ -35,4 +44,3 @@ buildPythonPackage rec { maintainers = with maintainers; [ psyanticy ]; }; } -