summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-06-23 18:05:04 +0200
committerGitHub <noreply@github.com>2018-06-23 18:05:04 +0200
commit4df1161ea442b3afaed18c91c03db6557749d7ef (patch)
treebc7a9f31cb202dbfd66ad1064935d75d62642d5c
parent43520486c78e8d874a33f135c36a1b2a75b47480 (diff)
parente84a8bf83d64bc55d58ecbdbddc9a45156c0d752 (diff)
downloadnixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.tar
nixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.tar.gz
nixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.tar.bz2
nixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.tar.lz
nixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.tar.xz
nixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.tar.zst
nixlib-4df1161ea442b3afaed18c91c03db6557749d7ef.zip
Merge pull request #42367 from Assassinkin/monty
pythonPackages.monty: init at 1.0.2
-rw-r--r--pkgs/development/python-modules/monty/default.nix38
-rw-r--r--pkgs/top-level/python-packages.nix4
2 files changed, 41 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/monty/default.nix b/pkgs/development/python-modules/monty/default.nix
new file mode 100644
index 000000000000..e53098f6f232
--- /dev/null
+++ b/pkgs/development/python-modules/monty/default.nix
@@ -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; {
+    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 ];
+  };
+}
+
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index bee15aacac2b..25986fe8e462 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -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;