2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, pytestCheckHook
|
|
|
|
, python
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "frozendict";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "2.1.1";
|
2021-09-18 10:52:07 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "655b879217dd445a2023e16154cc231febef802b5c812d5c2e822280ad69e1dc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
# fixes build on non-x86_64 architectures
|
|
|
|
rm frozendict/src/3_9/cpython_src/Include/pyconfig.h
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"frozendict"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
rm -r frozendict
|
|
|
|
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# TypeError: unsupported operand type(s) for |=: 'frozendict.frozendict' and 'dict'
|
|
|
|
"test_union"
|
2021-12-26 17:43:05 +00:00
|
|
|
# non-standard assertions
|
|
|
|
"test_repr"
|
|
|
|
"test_format"
|
|
|
|
"test_str"
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# unpackaged test dependency: coold
|
|
|
|
"test/test_coold.py"
|
|
|
|
"test/test_coold_subclass.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/slezica/python-frozendict";
|
|
|
|
description = "An immutable dictionary";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|