3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/namedlist/default.nix

34 lines
765 B
Nix
Raw Normal View History

2018-12-13 03:01:45 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, pytest
}:
buildPythonPackage rec {
pname = "namedlist";
2020-09-27 21:04:27 +01:00
version = "1.8";
2018-12-13 03:01:45 +00:00
src = fetchPypi {
inherit pname version;
2020-09-27 21:04:27 +01:00
sha256 = "34f89fc992592c80b39a709e136edcf41ea17f24ba31eaf84a314a02c8b9bcef";
2018-12-13 03:01:45 +00:00
};
# Test file has a `unittest.main()` at the bottom that fails the tests;
# py.test can run the tests without it.
postPatch = ''
substituteInPlace test/test_namedlist.py --replace "unittest.main()" ""
'';
checkInputs = [ pytest ];
checkPhase = ''
py.test
'';
meta = {
description = "Similar to namedtuple, but instances are mutable";
homepage = "https://gitlab.com/ericvsmith/namedlist";
2018-12-13 03:01:45 +00:00
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ivan ];
};
}