Merge pull request #171378 from fabaff/namedlist-fix
python310Packages.namedlist: add patch for collections.abc
This commit is contained in:
commit
429af923fa
1 changed files with 30 additions and 9 deletions
|
@ -1,33 +1,54 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytest
|
, fetchpatch
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "namedlist";
|
pname = "namedlist";
|
||||||
version = "1.8";
|
version = "1.8";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "34f89fc992592c80b39a709e136edcf41ea17f24ba31eaf84a314a02c8b9bcef";
|
hash = "sha256-NPifyZJZLICzmnCeE27c9B6hfyS6Mer4SjFKAsi5vO8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Deprecation warning using collections.abc, https://gitlab.com/ericvsmith/namedlist/-/merge_requests/1
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.com/ericvsmith/namedlist/-/commit/102d15b455e6f058b9c95fe135167be82b34c14a.patch";
|
||||||
|
sha256 = "sha256-IfDgiObFFSOUnAlXR/+ye8uutGaFJ/AyQvCb76iNaMM=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
# Test file has a `unittest.main()` at the bottom that fails the tests;
|
# Test file has a `unittest.main()` at the bottom that fails the tests;
|
||||||
# py.test can run the tests without it.
|
# py.test can run the tests without it.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace test/test_namedlist.py --replace "unittest.main()" ""
|
substituteInPlace test/test_namedlist.py --replace "unittest.main()" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
pythonImportsCheck = [
|
||||||
checkPhase = ''
|
"namedlist"
|
||||||
py.test
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
disabledTests = [
|
||||||
|
# AttributeError: module 'collections' has no attribute 'Container'
|
||||||
|
"test_ABC"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "Similar to namedtuple, but instances are mutable";
|
description = "Similar to namedtuple, but instances are mutable";
|
||||||
homepage = "https://gitlab.com/ericvsmith/namedlist";
|
homepage = "https://gitlab.com/ericvsmith/namedlist";
|
||||||
license = lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with lib.maintainers; [ ivan ];
|
maintainers = with maintainers; [ ivan ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue