git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #42367 from Assassinkin/monty

pythonPackages.monty: init at 1.0.2

commit4df1161ea442b3afaed18c91c03db6557749d7ef authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateSat 23 Jun 2018, 18:05 (8 years ago) parent4352048e84a8bf
2 files changed+41−1
pkgs/development/python-modules/monty/default.nix+38 pkgs/top-level/python-packages.nix+3−1
pkgs/development/python-modules/monty/default.nixnew file+38
@@ -0,0 +1,38 @@
1+{ stdenv, buildPythonPackage, fetchFromGitHub, nose, numpy, six, ruamel_yaml, msgpack-python, coverage, coveralls, pymongo, lsof }:
2+
3+buildPythonPackage rec {
4+ pname = "monty";
5+ version = "1.0.2";
6+
7+ # No tests in Pypi
8+ src = fetchFromGitHub {
9+ owner = "materialsvirtuallab";
10+ repo = pname;
11+ rev = "v${version}";
12+ sha256 = "0ss70fanavqdpj56yymj06lacgnknb4ap39m2q28v9lz32cs6xdg";
13+ };
14+
15+ propagatedBuildInputs = [ nose numpy six ruamel_yaml msgpack-python coverage coveralls pymongo lsof ];
16+
17+ preCheck = ''
18+ substituteInPlace tests/test_os.py \
19+ --replace 'def test_which(self):' '#' \
20+ --replace 'py = which("python")' '#' \
21+ --replace 'self.assertEqual(os.path.basename(py), "python")' '#' \
22+ --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' \
23+ --replace 'self.assertIs(which("non_existent_exe"), None)' '#' \
24+ '';
25+
26+ meta = with stdenv.lib; {
27+ description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
28+ longDescription = "
29+ Monty implements supplementary useful functions for Python that are not part of the
30+ standard library. Examples include useful utilities like transparent support for zipped files, useful design
31+ patterns such as singleton and cached_class, and many more.
32+ ";
33+ homepage = https://github.com/materialsvirtuallab/monty;
34+ license = licenses.mit;
35+ maintainers = with maintainers; [ psyanticy ];
36+ };
37+}
38+
pkgs/top-level/python-packages.nix+3−1
@@ -291,7 +291,9 @@ in {
291291
292292 logster = callPackage ../development/python-modules/logster { };
293293
294− mail-parser = callPackage ../development/python-modules/mail-parser { };
294+ mail-parser = callPackage ../development/python-modules/mail-parser { };
295+
296+ monty = callPackage ../development/python-modules/monty { };
295297
296298 mpi4py = callPackage ../development/python-modules/mpi4py {
297299 mpi = pkgs.openmpi;