summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/monty/default.nix
diff options
context:
space:
mode:
authorAssassinkin <iuns@outlook.fr>2018-06-22 12:54:26 +0100
committerAssassinkin <iuns@outlook.fr>2018-06-22 12:54:26 +0100
commit0fe77afcaf94d65c02edce3b6282ca401ffefcdf (patch)
treea28569d1f904f5a3fe58fbc8093bf33249c2303d /pkgs/development/python-modules/monty/default.nix
parentPULL_REQUEST_TEMPLATE.md: Ask for closure size impact (diff)
downloadnixpkgs-0fe77afcaf94d65c02edce3b6282ca401ffefcdf.tar.gz
pythonPackages.monty: init at 1.0.2
Diffstat (limited to 'pkgs/development/python-modules/monty/default.nix')
-rw-r--r--pkgs/development/python-modules/monty/default.nix37
1 files changed, 37 insertions, 0 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..f3a564397b5f
--- /dev/null
+++ b/pkgs/development/python-modules/monty/default.nix
@@ -0,0 +1,37 @@
+{ 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; {
+ 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 ];
+ };
+}
+