Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions pkgs/development/python-modules/monty/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, nose, numpy, six, ruamel_yaml, msgpack-python, coverage, coveralls, pymongo, lsof }:

buildPythonPackage rec {
pname = "monty";
version = "1.0.2";

# No tests in Pypi
src = fetchFromGitHub {
owner = "materialsvirtuallab";
repo = pname;
rev = "v${version}";
sha256 = "0ss70fanavqdpj56yymj06lacgnknb4ap39m2q28v9lz32cs6xdg";
};

propagatedBuildInputs = [ nose numpy six ruamel_yaml msgpack-python coverage coveralls pymongo lsof ];

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)' '#' \
'';

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a short description (in field description), too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pSub Done.

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 ];
};
}

4 changes: 3 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ in {

logster = callPackage ../development/python-modules/logster { };

mail-parser = callPackage ../development/python-modules/mail-parser { };
mail-parser = callPackage ../development/python-modules/mail-parser { };

monty = callPackage ../development/python-modules/monty { };

mpi4py = callPackage ../development/python-modules/mpi4py {
mpi = pkgs.openmpi;
Expand Down