1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest
5}:
6
7buildPythonPackage rec {
8 pname = "namedlist";
9 version = "1.8";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "34f89fc992592c80b39a709e136edcf41ea17f24ba31eaf84a314a02c8b9bcef";
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://gitlab.com/ericvsmith/namedlist";
30 license = lib.licenses.asl20;
31 maintainers = with lib.maintainers; [ ivan ];
32 };
33}