1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest
5}:
6
7buildPythonPackage rec {
8 pname = "namedlist";
9 version = "1.7";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "11n9c4a5ak9971awkf1g92m6mcmiprhrw98ik2cmjsqxmz73j2qr";
14 };
15
16 # Test file has a `unittest.main()` at the bottom that fails the tests;
17 # py.test can run the tests without it.
18 postPatch = ''
19 substituteInPlace test/test_namedlist.py --replace "unittest.main()" ""
20 '';
21
22 checkInputs = [ pytest ];
23 checkPhase = ''
24 py.test
25 '';
26
27 meta = {
28 description = "Similar to namedtuple, but instances are mutable";
29 homepage = https://bitbucket.org/ericvsmith/namedlist;
30 license = lib.licenses.asl20;
31 maintainers = with lib.maintainers; [ ivan ];
32 };
33}